Python Dictionary : clear() In order to remove the all items from the dictionary we use clear(). It does not take any parameter Method does not return any value. Syntax Below syntax is used for clear() method – dict.clear() Python Dictionary : clear() Example #!/usr/bin/python dict = {'Word1': 'Meaning1', 'Word2': 'Meaning2'}; print ("Dictionary Length : …
Read More