Staging: this is not the live site, pydocs.org.
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order.
Raises KeyError if the dict is empty.
Changed in 3.7
- 3.7: LIFO order is now guaranteed. In prior versions, popitem() would return an arbitrary key/value pair.