*Module Name eli.py* x = 0
y = [1, 2] print 'Running module "eli"' def whitney(): print 'whitney' def printValues(): print x , y *When I imported the Module* from eli import x, y, printValues printValues() y[0] = 'cat' x = 'dog' printValues() Output Running module "eli" 0 [1, 2] 0 ['cat', 2] Can Someone explain this to me? Why x remains 0 ....Is it because x = 'dog' is local variable and y being a list is a mutable object that is changed easily. Also once we reload the module .... every value reverts to its original value .. Am I Right? Thanks, G
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor