Python3 dictionary items () method
description
Python dictionary items () method to return the list to traverse the (key, value) tuples array.
grammar
items () method syntax:
dict.items()
parameter
- NA.
return value
Returns traversal (key, value) tuples array.
Examples
The following example shows the items () method to use:
#!/usr/bin/python3 dict = {'Name': 'w3big', 'Age': 7} print ("Value : %s" % dict.items())
The above example output is:
Value : dict_items([('Age', 7), ('Name', 'w3big')])