for set python code example
Example 1: get length of set python
# Create a set
seta = {5,10,3,15,2,20}
# Or
setb = set([5, 10, 3, 15, 2, 20])
# Find the length use len()
print(len(setb))
Example 2: python set
set_example = {1, 2, 3, 4, 5, 5, 5}
print(set_example)
# OUTPUT
# {1, 2, 3, 4, 5} ----- Does not print repetitions