t294.py 284 B

1234567891011121314
  1. # Test behaviour of min() and max() on lists and tuples
  2. l = ['b','a','d','c']
  3. m = ['1','0','4','3']
  4. print l
  5. print m
  6. print min(l), max(l)
  7. print min(m), max(m)
  8. print min(l,m), max(l,m)
  9. t = tuple(l)
  10. u = tuple(m)
  11. print t
  12. print min(t), max(t)
  13. print min(u), max(u)
  14. print min(t,u), max(t,u)