Answers for "python declare variables from dictionary"

0

python declare variables from dictionary

>>> d = {'a':1, 'b':2}
>>> for key,val in d.items():
        exec(key + '=val')
Posted by: Guest on July-20-2020

Code answers related to "python declare variables from dictionary"

Python Answers by Framework

Browse Popular Code Answers by Language