Phoe6 wrote: > But it is not so. It always prints This is a String. astring > declared outside all the functions, is not in global section and > values be overwritten by functions accessing it? > > - How is this working?
If you assign "astring" inside the function body, it's a local name. > - What should I do to overwrite the string variable in the global > section within functions? Put a "global astring" in the function to access the global name instead. BTW, think about using a better interface than globals. Regards, Björn -- BOFH excuse #23: improperly oriented keyboard -- http://mail.python.org/mailman/listinfo/python-list