0
In the first page of dictionary functions, why does 8:64 come before the rest in the squares example?
4 odpowiedzi
+ 7
The newest version of Python indeed introduces ordered dictionaries as a new class. However, standard dictionaries are still unordered. The output when printing is performance-optimized and stable within an execution (if unmodified).
For standard dictionaries order is irrelevant, though.
+ 1
I think that is because order is not always preserved in Python 3.5's dictionaries (but it is in the brand new Python 3.6)
0
OrderdDict is available in the collections module since Python 2, I think.
The order in standard dict is still not guaranteed, but it is more often ordered than in 3.5. That's not a new class, just a new implementation
- 5
Plz play meebo plz and thx