clear method removes all items from the dictionary : Clear « Dictionary « Python Tutorial






d = {'host': 'earth', 'port': 80}

print d
returned_value = d.clear() 
print d 
print returned_value








8.3.Clear
8.3.1.clear method removes all items from the dictionary