3 ms·
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} >>> se
by johndough 3y ago
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}