Hello,

I am wondering if it is possible to create lists on the fly. The script 
that I'm working on needs a number of parameters, one of those is 
population, and this corresponds to the number of solutions that a 
genetic algorithm generates on each generation (iteration). The thing is 
that I need to generate one list for each population member and then 
append the corresponding population members to that particular list.

This is only so you can have an idea:

for i in range(5):
    'list_%i' % (i) = []

or:

for i in range(5):
    lista_+'%i' % (i) = []

:-[

Is this possible?

Thanks in advance,
And Merry Christmas,
Carlos


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to