Due to changes in dict implementation in Python 3.6 it is now ordered by default. Do sets preserve order as well now?
I could not find any
sets are not ordered in Python 3.6, not even as a CPython implementation detail. A simple example illustrates this:
>>> import string
>>> string.digits
'0123456789'
>>> set(string.digits)
{'7', '0', '2', '8', '6', '9', '1', '5', '4', '3'}
The Python 3 docs are clear on this:
A set is an unordered collection with no duplicate elements.