import random as r
mas = []
for i in range(10):
a = r.randint(0,1000)
mas.append(a)
print(mas)
suma = sum(mas)
print("Suma: ",suma)
Пример
[638, 483, 964, 695, 125, 998, 951, 40, 463, 441]Suma: 5798[436, 752, 371, 622, 194, 945, 296, 644, 786, 355]Suma: 5401
[128, 23, 467, 943, 60, 954, 245, 575, 255, 520]Suma: 4170