Back Navigation Next Navigation Conceptual Review (page 39 of 55)

We may remove a specific key: value pair from a dictionary by using pop() and passing in the key. We may also use popitem() to remove the last key: value pair from the dictionary.

Dictionaries

We may use clear() to remove all key: value pairs from the dictionary. Doing so will keep the dictionary in memory, but remove all the items.

We may use del to remove the dictionary from memory

del squares