ID EN
Collections

popitem

Python 3.11

The popitem() method for ordered dictionaries returns and removes a (key, value) pair. The pairs are returned in LIFO order if last is true or FIFO order if false.

Syntax

PYTHON
popitem(last=True)

See Also

popitem()