A set is an unordered collection with no duplicates.
numbers = {1, 2, 3, 4, 5}
unique_letters = set("hello") # {'h', 'e', 'l', 'o'}
numbers = {1, 2, 2, 3, 3, 3}
print(numbers) # {1, 2, 3}
a = {1, 2, 3}
b = {3, 4, 5}
a | b # Union: {1, 2, 3, 4, 5}
a & b # Intersection: {3}
a - b # Difference: {1, 2}
Interactive Visualization