Thursday, September 10, 2015

Sets in python

a = set(["Jake", "John", "Eric"])
b=set(["asas","sdsad","Eric"])

print a.intersection(b)
print a.difference(b)
print a.union(b)

No comments:

Post a Comment