Articles → Python → Dictionary items function in python
Dictionary items function in python
Purpose
Example
# A dictionary with 2 keys i.e. name and age
dict = {"name":"gyan", "age":18}
# Convert to list and print list of items
print("Items-", list(dict.items()))
Output
Click to Enlarge