programming-examples/python/Sets/Python program to create an intersection of sets.py

5 lines
119 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
#Intersection
setx = set(["green", "blue"])
sety = set(["blue", "yellow"])
setz = setx & sety
print(setz)