Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python declare variables from dictionary

>>> d = {'a':1, 'b':2}
>>> for key,val in d.items():
        exec(key + '=val')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #declare #variables #dictionary
ADD COMMENT
Topic
Name
8+8 =