[Tutor] how do (or do I) do a list of variable names?

rick rdole1 at cogeco.ca
Sun Feb 2 13:48:34 CET 2014


Hello Everyone,

I think my approach is all wrong, but here goes.

var1 = []; var2 = []; var3 = [];  . . .  ~50 lists


each variable would be a list of two digit integers, or two digit
integers stored as strings (I don't need to do any math, I just need to
know which integers are in which variable)

container = [var1,var2,var3 . . . ]

I'd like to be able to iterate over container or pick out one or more of
my lists to write out an input (text) file for an external program.

The thing is, assigning all those lists to a list gives me a list of
lists, not a list of my variable names.  Worse, I may or may not be able
to have changes to a list show up in my list of lists, depending on how
& when I do it.

Really kludgy, but it is a one off that will likely never be used again.

TIA,
Rick

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/tutor/attachments/20140202/b3250108/attachment.sig>


More information about the Tutor mailing list