#!/usr/local/bin/python3 xxx = 10 xx = 1000 class Foo: print(xxx) xx = 100 def foo(): print(xxx) print(xx) foo = Foo() Foo.foo()