set operation on string : inter2 « Buildin Module « Python Tutorial






from inter2 import intersect, union 
s1, s2, s3 = "SPAM", "SCAM", "SLAM" 

print intersect(s1, s2), union(s1, s2)             # Two operands
print intersect([1,2,3], (1,4))                    # Mixed types
print intersect(s1, s2, s3)                        # Three operands
print union(s1, s2, s3)








14.7.inter2
14.7.1.set operation on string