My Code:
def A(): a = \'A\' print a return def B(): print a + \' in B\' return
When B() is entered into the interpeter
You can do this by using the global keyword:
global
def A(): global a a = 'A' def B(): global a # ...
However, using global variables is generally a bad idea - are you sure there's not a better way to do what you want to do?