+ 1
How do you calculate the sum of a list in python?(with only for loop)
list = [1, 2, 3, 4, 5, 6, 7, 8, 9] sum = 0
3 Answers
+ 8
Loop through the list and add the current element to sum on each iteration
+ 3
reihane ,
to get useful help from the community, we need to see your attempt first. without having seen your code, it is difficult to find out where the issue is.
=> please put your code in playground and link it here
thanks!
+ 1
I did it thanks!