On Sun, Oct 10, 2021 at 01:51:52AM +0900, Stephen J. Turnbull wrote:
Christopher Barker writes:
But last time, one of the use cases was "get [an arbitrary] item from a dict", and there really is not a terribly easy (and efficient) way to do that now.
What's wrong with thedict.popitem()? Works in Python 2.7, BTW.
It removes the key and value, not just retrieve them.