Python Function Reference

popitem
Remove and return a (key, value) pair from the dictionary.
Python 3.13
dict.popitem()
Examples
Python 3.13
>>> a = {'x': 1, 'y': 2}
>>> a.popitem()
('x', 1)