Skip to content

Python 3.6 + Updates on dictionary  #48

@amde-et

Description

@amde-et

https://python-reference.readthedocs.io/en/latest/docs/dict/
In this page it said that ,
"Dictionaries are mutable unordered collections (they do not record element position or order of insertion) of key-value pairs. Keys within the dictionary must be unique and must be hashable. That includes types like numbers, strings and tuples. Lists and dicts can not be used as keys since they are mutable. Dictionaries in other languages are also called hash tables or associative arrays."

However on the new updates
Dictionaries are insertion-ordered. This means the order in which key-value pairs are added to the dictionary is preserved when iterating over it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions