Advertisement
k1alo

Макс. число в списке

Oct 27th, 2023
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
  2. max_number = my_list[0]
  3. for number in my_list:
  4.     if number > max_number:
  5.         max_number = number
  6. print(max_number)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement