t310.py 265 B

1234567891011121314151617181920
  1. s = set([2,3,4])
  2. t = set([3,4,5])
  3. u = set([1,3,5])
  4. a = s.intersection(t)
  5. b = u.intersection(s)
  6. c = u.intersection(t)
  7. print a
  8. print b
  9. print c
  10. print a == set([3, 4])
  11. print b == set([3])
  12. print c == set([3, 5])
  13. d = s.intersection(t, u)
  14. print d
  15. print d == set([3])