programming-examples/python/Sets/Python program to create set difference.py

7 lines
160 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
setx = set(["apple", "mango"])
sety = set(["mango", "orange"])
setz = setx & sety
print(setz)
#Set difference
setb = setx - setz
print(setb)