On Fri, Sep 21, 2012 at 11:11 AM, Dae James <[email protected]> wrote:

> **
> How can I convert a variable name to a string ?
> For example:
> testVariable = 1000;
> How can I get the string "testVariable" ?
> Thank you~
>
>
Well, the locals() dictionary will have a "testVariable" entry in it.. but
if I may ask, why would you want to do this? I see no reason this would
ever be necessary.

Hugo
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to