The method items() returns a list of dict's (key, value) tuple pairs
Following is the syntax for items() method:
dict.items()
NA
This method returns a list of tuple pairs.
The following example shows the usage of items() method.
#!/usr/bin/python dict = {'Name': 'Zara', 'Age': 7} print "Value : %s" % dict.items()
When we run above program, it produces following result:
Value : [('Age', 7), ('Name', 'Zara')]