Creating a new dictionary in Python
You can do this
x = {}
x['a'] = 1
Call dict
with no parameters
new_dict = dict()
or simply write
new_dict = {}
You can do this
x = {}
x['a'] = 1
Call dict
with no parameters
new_dict = dict()
or simply write
new_dict = {}