""" one.py trying to change a global variable """ this_global = 7 this_list = [1, 2, 3, 4] def some_function(): # This does *not* change a global. this_global = 9 def other_function(): # This *does* change a global. # This is side effect. BAD PRACTICE. this_list[0] = 20 some_function() other_function() print "this_global is ", this_global print "this_list is ", this_list