Answers for "how to add up everything in a list python"

1

how to add up everything in a list python

num = [1,2,3,4]

print(num.sum())
#We use the .sum() function for the adding of everything
Posted by: Guest on May-30-2021
16

python sum of list

>>> list = [1, 2, 3]
>>> sum(list)
6
Posted by: Guest on January-27-2020

Code answers related to "how to add up everything in a list python"

Python Answers by Framework

Browse Popular Code Answers by Language