KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a Python dictionary steps = {1:"value1", 5:"value2", 2:"value3"} I need to iterate over this sorted by key. I tried this: x = sorted(steps, key=lambda key: steps[key]) but the values are gone from x.
Tags (comma-separated)
Save Edits
Cancel