Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # int_min_max_demo.py
- example_list = [4.6, 5.9, 8.3, 1.7, 2.6]
- print "Example list --"
- print [ '%.1f' % elem for elem in example_list ] ### Note: example_list will otherwise display long integers
- print
- minimum_number = min(example_list)
- print "The minimum of this example list is", minimum_number
- print
- maximum_number = max(example_list)
- print "The maximum of this example list is", maximum_number
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement