t299.py 441 B

1234567891011121314151617181920212223242526272829
  1. # Test the comparison of sets
  2. l = [1,2,3,4,1,1]
  3. print l
  4. s = set(l)
  5. print s
  6. # Test the comparison of sets
  7. print '# self'
  8. print '# forwards'
  9. print s.isdisjoint(s)
  10. print s > s
  11. print s.issuperset(s)
  12. print s >= s
  13. print s == s
  14. print s != s
  15. print s.issubset(s)
  16. print s <= s
  17. print s < s
  18. print '# backwards'
  19. print s.isdisjoint(s)
  20. print s > s
  21. print s.issuperset(s)
  22. print s >= s
  23. print s == s
  24. print s != s
  25. print s.issubset(s)
  26. print s <= s
  27. print s < s