Assuming a list contains numeric values, to calculate the total of those values you use a loop with an accumulator variable. The loop steps through the list, adding the value of each element to the accumulator.
Read »Totaling the Values in a List in Python
http://www.itechtalk.com –
User login
Navigation
Categories
Best published scoops - Technology
Best Stories
Who's online
There are currently 2 users and 11 guests online.
Online users
- azharul
- angeleye
