To find the sum of a 5 number list in Python, you can use the sum()
function. Here's an example code block that demonstrates this:
main.py204 chars4 lines
Output:
main.py27 chars2 lines
Alternatively, you can use a loop to iterate over the list and add up the values:
main.py310 chars6 lines
Output:
main.py27 chars2 lines
gistlibby LogSnag