t537.py 375 B

12345678910111213141516171819202122
  1. try:
  2. min(3)
  3. except TypeError:
  4. print "min(3) raises type error"
  5. try:
  6. max(3)
  7. except TypeError:
  8. print "max(3) raises type error"
  9. try:
  10. min([])
  11. except ValueError:
  12. print "min([]) raises value error"
  13. try:
  14. max(tuple())
  15. except ValueError:
  16. print "max(tuple()) raises value error"
  17. print max(i for i in range(7))
  18. print min(j for j in range(4, 1, -1))