def a(): d = b() print d def b() c = "Hi" return c
if __name__ == "__main__": a() Cheers TG On Dec 3, 2007, at 3:05 PM, Victor Subervi wrote: > Hi; > Here is sample function: > > def a(): > b() > print c > > def b(): > c = "Hi" > return c > > if __name__ == "__main__": > a() > > then run a(). Throws error about c not being defined. How do I > return c from b? > TIA, > Victor > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list