[Tutor] Naming variables

Pierre Dagenais pierre.dagenais at ncf.ca
Sat Jan 18 19:20:55 CET 2014


Hello,

I wish to fill a list called years[] with a hundred lists called
year1900[], year1901[], year1902[], ..., year1999[]. That is too much
typing of course. Any way of doing this in a loop? I've tried stuff like
("year" + str(1900)) = [0,0] but nothing works.
Any solution?

Thank you,

PierreD.


More information about the Tutor mailing list