Add all items in a tuple, and return the result:
a = (1, 2, 3, 4, 5)
x = sum(a)
The sum()
function returns a number, the sum of all items in an iterable.
Start with the number 7, and add all the items in a tuple to this number:
a = (1, 2, 3, 4, 5)
x = sum(a, 7)
Track your progress - it's free!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4