Python dictionaries are now ordered ex39

Apparently as of Python version 3.7, dictionaries are ordered. I’m currently useing Python 3.10.1 . maybe my title should be “has been ordered”
EX39 Study Drill #3

  1. Find out what you can’t do with dictionaries. A big one is that they do not have order, so try playing with that.

well…

Trying to use my googlefoo and its making my head spin. medium.com has a write up on it,
Dict ordered now yet just talks over my head about ‘hash tables’ and ‘dense/sparse array’.
Other sites just reiterate that dicts are now ordered.

help(dict) in python interpeter gives ton of info on dicts but nothing on the change.
Besides saving on memorie, how does this help our end? Any use like a list? indexing ect?

If you got an hour, sit through this explanation. Modern Dictionaries by Raymond Hettinger - YouTube

I must admit I wasn’t aware of this but for the hobbyist like me, its makes little difference. Odd that sets are still unordered though…

1 Like

I’ve seen some of his talks. On video that is. Thank you, I’ll defently have a look at this as well.

“There must be a better way.” :upside_down_face: