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