(Oct-01-2020, 03:25 PM)Marbelous Wrote: The dict on line 12 is essentially random.That is not dict, but
set
. Otherwise you are right - it's unordered collectionJust to clear something about dicts - as of 3.7 dicts preserve insertion order. This was also true in 3.6 but as implementation detail.
Also let say that you can do
lst = [3, 3, 22, 22, 1, 4, 5, 6, 10, 20, 40, 40, 40, 50] dup_free_set = set(lst)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs