Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
python declare variables from dictionary
djelaletdin
Programming language:
Python
2021-05-30 14:34:57
0
Q:
python declare variables from dictionary
Bizhan
Code:
Python
2021-05-22 15:22:34
>>>
d = {
'a'
:
1
,
'b'
:
2
}
>>>
for
key,val
in
d.items(): exec(key +
'=val'
)
0
Tags
python
variable
declare
var
dict
Related
python how to get variable value in dict
instantiate a dictionary python
python create dictionary from key value
how to set a key of dict in python
how to declare a variable in python
change dictionary value python
python variable definieren
reassign variable python
python declare variable
python make a dictionary
how to modify the dict in python
détruire une variable python
set to dictionary python
python declare variable without value
how to create dynamic variable names in python
how to make variables in python
how to store a return value in a variable in python
declare a dictionary python
New to Communities?
Join the community