Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
davidwtbuxton
on March 8, 2014
|
parent
|
context
|
favorite
| on:
Python Language Features and Tricks
The order of items in the dictionary isn't stable, but the order of .keys() is guaranteed to be the same as the order of .values() (as long as you don't modify the dict in between calling one then the other).
http://docs.python.org/2/library/stdtypes.html#dict.items
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
http://docs.python.org/2/library/stdtypes.html#dict.items