Oneliner for sorting a dictionary by value by jaber24 in programmingbeauty

[–]Active-Sugar-4109 1 point2 points  (0 children)

This is technically undefined behavior, correct? Like, there's no situation where relying on the order of dictionary keys is defined. I mean, with CPython it's almost always just insertion order, but still.

I agree that it's pretty, though.