In this example we will show how to make a new dictionary using the dict() constructor in Python.
Source Code
mydict = dict(name="Jim", age="12", id=16)
print(mydict)
Output:
{'name': 'Jim', 'age': '12', 'id': 16}
In this example we will show how to make a new dictionary using the dict() constructor in Python.
mydict = dict(name="Jim", age="12", id=16)
print(mydict)
Output:
{'name': 'Jim', 'age': '12', 'id': 16}