clear() in Python Dictionary

It is a method in python that clears all the content of the dictionary. It empties the existing dictionary. It modifies the dictionary. And it doesn’t return a value. Syntax: dictionary.clear() Don’t know what is len in Python? Read: len() in Python Dictionary Example 1: Output: {} Explanation: Here it clears the dictionary and leaves […]

clear() in Python Dictionary Read More »