#!/usr/bin/env/python global testVar testVar = 0 print "You should see 0 below, just so that it can make sure that it got stored correctly." print testVar def main(): print "reached main def. you should see 0 below." print testVar testVar = 1 subFunc() print "exited subFunc. You should see 2 below." print testVar def subFunc(): print "reached subFunc. You should see 1 below." print testVar testVar = 2 print "exiting subFunc." return 1 main()