Tuples and Sets

x = (1,2,3,4,5)
#Its a tuple

Why use a Tuple

Different Methods on Tuples

Sets in Python

set = {1,2,3,4}
# This is how a set looks like
a = set{(1,2,3)}

Set Methods

Mathematical Methods in Sets

a = {1,2,3,4}
b = {2,3,5}
a | b #This will print {1,2,3,4,5}
a & b # This will print {2,3}

Set Comprehension

x = {1,2,3,4}
b = {num+2 for num in x}