create global variables?

Wojciech Muła wojciech_mula at poczta.null.onet.pl.invalid
Mon Oct 30 18:22:51 CET 2006


Alistair King wrote:
> is there a simple way of creating global variables within a function?

def foo(name):
	globals()[name] = "xxx"
	globals()[name + 'aa'] = "yyy"
	globals()[name + 'ab'] = "zzz"



More information about the Python-list mailing list