Python Dictionary clear() method

The dictionary.clear() method in Python removes all the elements from a dictionary.

Syntax

Parameter

NA

Return

None

Example 1

Output

Example 2

Output

Pin It on Pinterest

Share This