Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
Sequences have a deterministic ordering. Collections don't. Lists, tuples, and strings are sequences because things come out of them in the same order they were put in. Sets and dictionaries are collections. The ordering of items in sets is not random and it's technically not unpredictable. The ordering of keys and values in dictionaries is arbitrary. I hope this helps. Thanks for reading :D
8th Jul 2017, 8:11 PM
Moon
Moon - avatar