Question: what is the difference between set and dictionary in python?
Answer: Dictionaries are unordered sets. But the main difference is that items in dictionaries are accessed via keys and not via their position. The values of a dictionary can be any Python data type. A set is a collection which is unordered and unindexed.