[Tutor] sum of a list
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Wed Aug 11 20:55:17 CEST 2004
On Wed, 11 Aug 2004, Alan Gauld wrote:
> > try "sum(l_input)".
>
> Wow! When did that one appear? I've never noticed a sum() function
> before.
Hi Alan,
The Python implementors snuck...er, added sum() into Python 2.3:
http://www.python.org/doc/lib/built-in-funcs.html#l2h-65
Here's a link to the python-dev summary about sum():
http://www.python.org/dev/summary/2003-04-16_2003-04-30.html#summing-a-bunch-of-numbers-or-whatevers
Hope this helps!
More information about the Tutor
mailing list