[Tutor] create 1000 000 variables

Сергій kyxaxa at gmail.com
Sun Jul 16 10:27:39 CEST 2006


>
> > In fact I want to create a list of variables from the list of strings
> >
> > Example: ['var1', 'var2', 'var3'....] - list of strings
>
> Ok, let's stop for the moment.
>
> Do you know about "dictionaries" yet?  If not, we should point this out to
>
> you, because they solve the problem you describe.



Yes. I know about dictionaries.
But I wanted to



> In fact I want to create a list of variables from the list of strings
>
> Example: ['var1', 'var2', 'var3'....] - list of strings
> And I need to create variables var1, var2, var3 named as strings in the
> list, and:
> var1 == 'var1'
> var2 == 'var2'
> var3 == 'var3'
>
> How to do this using only my list and "for i in "???
>


Can you show me how to solve this using your dictionaries?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060716/206af28c/attachment.html 


More information about the Tutor mailing list