DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python use variable name as variable
>>> foo = "bar" >>> exec(foo + " = 'something else'") >>> print bar something else >>>
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#variable
#variable
ADD COMMENT
Topic
COMMENT
Name
2+9 =
Submit