Popitem() MethodPopitem() Method

Dictionaries also have a popitem() method that removes and returns the last key-value pair.

Task

Consider the dictionary below:

Remove the last three entries from the dictionary using the popitem() method.

Everything was clear?

Section 2. Chapter 8
toggle bottom row