Python Dictionary keys() method

The dictionary.keys() method in Python returns a view object that displays a list of all the keys in the dictionary

Syntax

Parameter

NA

Return

This method returns a view object that displays a list of all the keys in the dictionary

Example 1

Output

Example 2

Output

Example 3

Output

Pin It on Pinterest

Share This