On Sep 21, 2012, at 6:14 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~
Use a dictionary.
vars['testVariable'] = 1000
for key in vars:
print key
print vars[key]
------------------------------
Dae James
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor