say you have a list, b, you don't know how many items are in there, but how could you add up all the items? for example, if your list is [2,4,5,8,10] is it possible to find the sum of all the numbers? so it will give you 29?
i've been thinking, is there a way to find out the amount of items in a list you have? then i can just do:
b = [1,2,5,8,300,2568.......]
k = 0
m = how many items
while k <=m:
for n in range (m+1):
k = k + b[n]
print (k)
i understand neither of those commands are very common, however at this point either would really help me out...