X = set('spam') Y = set(['h', 'a', 'm']) # Make 2 sets out of sequences print X, Y print X & Y # Intersection print X | Y # Union print X - Y # Difference