Nx schrieb: > Hi > > I am unpacking a list into variables, for some reason they need to be > unpacked into variable names like a0,a1,a2....upto aN whatever is > in the list. > > How to create the variables dynamically ? > > I am looking for something like > pseudo code line follows : > > a%s = str(value)
>>> suffix = 'var' >>> vars()['a%s' % suffix] = 45 >>> avar 45 -- ------------------------------------------------------------------- Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0 E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64') ------------------------------------------------------------------- -- http://mail.python.org/mailman/listinfo/python-list