[Tutor] Adding Lists?
Tom Wakelam
tomonzob_1 at hotmail.co.uk
Sat Aug 23 19:27:21 CEST 2008
Hi, hope i've got the email right, and you can help
If i have a list of integers, could i then total up the list?
e.g.
range (1, 5) gives [1, 2, 3, 4] which is easily totalled at 10,
yet if i wrote range (1, 500, 2) [1, 3, 5, 7....... ..499] is there a command where i could total that list quickly?
Many thanks, Tom
_________________________________________________________________
Make a mini you on Windows Live Messenger!
http://clk.atdmt.com/UKM/go/107571437/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080823/e641f92c/attachment.htm>
More information about the Tutor
mailing list