Advertisement
Felanpro

max() and min()

Aug 5th, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. #max() built-in function.
  2. x = max(5, 9, 19, 20, 6, 1, 34, 56, 3, 23, 67)
  3.  
  4. print(x)
  5.  
  6. example_list = [45, 3, 89, 56, 90]
  7.  
  8. print(max(example_list))
  9.  
  10.  
  11. #min() built-in function.
  12. y = min(5, 6)
  13.  
  14. print(y)
  15.  
  16. example_list2 = [68, 90, 96, 4, 23]
  17.  
  18. print(min(example_list2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement