Search
 
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
Name
2+9 =