News for hackers. Stuff that matters.
Re:Ask HN: C/C++ developer wanting to learn efficient Python by alfons_foobar on Wednesday April 10, 2024 @12:12PM (#39992358)
Ordered by insertion (see [Mailinglist](https://mail.python.org/pipermail/python-dev/2017-December/1...))

This might or might not be what you want/expect...

Re:Ask HN: C/C++ developer wanting to learn efficient Python by johndough on Wednesday April 10, 2024 @12:32PM (#39992630)
You are correct. Dicts are ordered by insertion. Also, I'd like to add that, maybe surprisingly, sets are not.

    >>> set([3, 2, 1])
    {1, 2, 3}

    >>> set([10, 100, 1000])
    {1000, 10, 100}