programming-examples/python/Sets/Python program to create an intersection of sets.py
2019-11-15 12:59:38 +01:00

5 lines
119 B
Python

#Intersection
setx = set(["green", "blue"])
sety = set(["blue", "yellow"])
setz = setx & sety
print(setz)