In order to assign to a global in a funtion, you must use the global statement, otherwise Python will assume you are assigning to a local. That's the way I understand it, anyway. test.py: t1 = [] t2 = 0 def testme(): global t2 print t1 print t2 t2+=1 /d/