List of numbers

say i have a list full with number… [1, 2, 3]
is there any code i can write so it will give me the result of all the number in the list combine? [6]

Do you mean the sum of all the numbers? If so, then if the list is named n, you can use sum(n) or len(n) * (len(n) + 1) / 2.

1 Like