generating unique variable name via loops

Veek M vek.m1234 at gmail.com
Tue Nov 4 07:19:14 EST 2014


Fatih Güven wrote:

> 4 Kas?m 2014 Sal? 13:29:34 UTC+2 tarihinde Fatih Güven yazd?:
>> I want to generate a unique variable name for list using python.
>> 
>> list1=...
>> list2=...

for x in range(1,10):
    exec("list%d = []" % x)




More information about the Python-list mailing list