+ 12
What does set do?
3 Answers
+ 7
Sets are useful for removing multiples.
print(set([1, 2, 2, 4, 4, 4, 5]))
# output {1, 2, 4, 5}
+ 4
A Set is an unordered collection data type that is iterable, mutable and has no duplicate elements. Python's setclass represents the mathematical notion of a set.