Python Dictionary items() method

The dictionary.items() method in Python returns a view object that displays a list of dictionary’s (key, value) tuple pairs.

Syntax

Parameter

NA

Return

This method returns a view object, displaying the list of the specified dictionary’s tuple pairs.

Example 1

Output

Example 2

Output

Pin It on Pinterest

Share This