I am practicing an exercise in Python to add the elements of a list and when I add the values I get this way by console:
[1, 2]
1
3
[5, 4, 2]
5
9
11
[12, 11, 120]
12
23
143
[50, 22, 88, 80, 108]
and I want the total value of each list to come out and as you will see, I always repeat the first element in each result:
[1, 2]
1 <--- aca me agrega el 1 en consola
3 <--y yo lo que quiero es que solo me salga la suma que es 3
[5, 4, 2]
5
9
later I want to add the total value of all the elements, that's why I added it with lista2.append(suma)
but when I add the values incorrectly I can not do well the total value of the sums.