my_dict = { 0: 'zero', 1: 'one', 2: 'two', 3: 'three' } #remove all elements my_dict.clear() #the dictionary is now empty print(my_dict)thisdict = { "brand": "Ford", "model": "Mustang", "year": 1964 } thisdict.clear()dict_name.clear()
my_dict = { 0: 'zero', 1: 'one', 2: 'two', 3: 'three' } #remove all elements my_dict.clear() #the dictionary is now empty print(my_dict)thisdict = { "brand": "Ford", "model": "Mustang", "year": 1964 } thisdict.clear()dict_name.clear()