Advertisement
IT45200

Untitled

May 30th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. def fct_max(my_list):
  2.     max_value = my_list[0]      
  3.     for item in my_list:      
  4.         if item > max_value:
  5.             max_value = item
  6.     return max_value        
  7.    
  8. print(fct_max([2, 8, 4, 3, 7]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement