t311.py 233 B

12345678910111213141516171819
  1. s = set([2,3,4])
  2. t = set([3,4,5])
  3. u = set([1,3,5])
  4. print s
  5. s.intersection_update(t)
  6. u.intersection_update(t)
  7. print s
  8. print u
  9. print s == set([3, 4])
  10. print u == set([3, 5])
  11. t.intersection_update(s, u)
  12. print t
  13. print t == set([3])