On Mon, Sep 24, 2012 at 7:43 PM, Jayden <jayden.s...@gmail.com> wrote: > Dear All, > > I have a simple code as follows: > > # Begin > a = 1 > > def f(): > print a > > def g(): > a = 20 > f() > > g() > #End > > I think the results should be 20, but it is 1. Would you please tell me why? > > Thanks a lot! > > -- > http://mail.python.org/mailman/listinfo/python-list
didn't return the value, or print it out -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com -- http://mail.python.org/mailman/listinfo/python-list