Advertisement
k1alo

Сумма чисел в списке

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