Advertisement
here2share

# int_min_max_demo.py

Jan 10th, 2015
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. # int_min_max_demo.py
  2.  
  3. example_list = [4.6, 5.9, 8.3, 1.7, 2.6]
  4.  
  5. print "Example list --"
  6. print [ '%.1f' % elem for elem in example_list ] ### Note: example_list will otherwise display long integers
  7. print
  8. minimum_number = min(example_list)
  9. print "The minimum of this example list is", minimum_number
  10.  
  11. print
  12. maximum_number = max(example_list)
  13. print "The maximum of this example list is", maximum_number
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement