generating unique variable name via loops
Fatih Güven
mfthguven at gmail.com
Tue Nov 4 08:45:04 EST 2014
4 Kasım 2014 Salı 15:19:20 UTC+2 tarihinde Veek M yazdı:
> 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)
This is okay but i can't use the method ".append" for example list1.append("abc")
More information about the Python-list
mailing list