t497.py 343 B

12345678910111213141516171819
  1. def helper(x, y):
  2. print
  3. print 'compare', x, 'and', y
  4. print x is y, x is not y
  5. print x == y, x != y
  6. print x < y, x <= y
  7. print x > y, x >= y
  8. helper(None, None)
  9. helper(None, True)
  10. helper(None, False)
  11. helper(True, True)
  12. helper(True, False)
  13. helper(True, None)
  14. helper(False, False)
  15. helper(False, True)
  16. helper(False, None)