def foo(): print "ncalling foo()..." bar = 200 print "in foo(), bar is", barbar = 100print "in __main__, bar is", barfoo()print "nin __main__, bar is (still)", baris_this_global = 'xyz'def foo(): global is_this_global this_is_local = 'abc' is_this_global = 'def' print this_is_local + is_this_globalfoo()print is_this_global
Name (required)
email (will not be published) (required)
Website