Dictionary In Python

Source URL: N/A

Language: python

Created on: 2021-01-30 15:02:48

my_dict = {"key": "value", "a": 1, 2: "b"}
print(my_dict["key"])
# Output: value
print(my_dict["a"])
# Output: 1
print(my_dict[2])
# Output: b
Dictionary In Python
content_copy