human
sort dict by value python
assistant
Here is some code to get a list of pairs of key-value sorted by values in dictionary `data`

sorted(list(data.items()), key=lambda x: x[1])

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.