first = {1, 2, 3, 4} second = {1, 5} first | second # {1, 2, 3, 4, 5} first & second # {1} first - second # {2, 3, 4} first ^ second # {2, 3, 4, 5} if 1 in first: ...