Skip to content

Commit ef3159a

Browse files
committed
Episode 01: remove statement about order in Python dict
The order in Python dictionaries is a delicate issue and is too complex to describe to a novice learner correctly. Statement that the order in which key-value pairs are returned in a 'for' loop is not guaranteed, on the other hand, is no longer correct. We could say that some "order-dependent" functions do not apply to the classical Python dictionaries (e.g., reversed, move_to_end), but that would be an overkill. I think that deleting this statement might be the best course of action at this moment.
1 parent dbfad33 commit ef3159a

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

_episodes/01-short-introduction-to-Python.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,6 @@ for key in rev.keys():
459459
>
460460
{: .challenge}
461461

462-
It is important to note that dictionaries are "unordered" and do not remember
463-
the sequence of their items (i.e. the order in which key:value pairs were
464-
added to the dictionary). Because of this, the order in which items are
465-
returned from loops over dictionaries might appear random and can even change
466-
with time.
467-
468-
469462

470463
## Functions
471464

0 commit comments

Comments
 (0)