Variable names on the fly?

maxm maxm at mxm.dk
Fri Nov 15 03:40:29 EST 2002


e-tones.co.uk wrote:

> Hi all, does python allow the creation of variable names on the fly, more
> importantly lists.

You can most certainly generate variable names on the fly, but most 
likely you don't want to!

If you get into that habbit, you risk overwriting some of the built in 
names or overwriting class attributes. Especially if you get user input. 
So don't pick up that habbit.

lists and dicts are there so you don't have to.

regards Max M




More information about the Python-list mailing list