Course
Simulator
More
Premium
Log in
Python Function Reference
Functions
sum
sum
Sums start and the items of an iterable from left to right and returns the total.
Python 3.13
1
sum
(
iterable
,
start
=
0
)
iterable
An iterable object with numbers.
start
The starting value for the sum.
Examples
Python 3.13
1
sum
(
[
1
,
2
,
3
,
4
,
5
]
)
15