Python dict.clear() Method
The clear() method removes all the elements from the dictionary.
Syntax
dictionary.clear()
Parameters
No parameters.
Return Value
None. The dictionary is modified in place.
Example
Using the clear() method:
Output
Click Run to execute your code
Enjoying these tutorials?