Python dict.items() Method
The items() method returns a view object. The view object contains
the key-value pairs of the dictionary, as tuples in a list.
The view object will reflect any changes done to the dictionary.
Syntax
dictionary.items()
Parameters
No parameters.
Return Value
A view object containing the key-value pairs.
Example
Using the items() method:
Output
Click Run to execute your code
Enjoying these tutorials?