Re: [Tutor] Sum of List Elements

2005-09-24 Thread Luke Jordan
Thanks for the help everyone, for answering a simple question and pointing me toward more resources.On 9/24/05, bob < [EMAIL PROTECTED]> wrote:At 08:11 AM 9/24/2005, Luke Jordan wrote:>Hi All, >>I have spent an embarrassingly large amount of time trying to solve what>on its face seems like a simple

Re: [Tutor] Sum of List Elements

2005-09-24 Thread bob
At 08:11 AM 9/24/2005, Luke Jordan wrote: >Hi All, > >I have spent an embarrassingly large amount of time trying to solve what >on its face seems like a simple problem. > >I have a list of intergers, and I want to assign the sum of the intergers >in the list to a variable. There are only interger

Re: [Tutor] Sum of List Elements

2005-09-24 Thread grouchy
Also, the built in function sum(): total = sum(list) Which is probably the One Obvious Way since 2.3, if I had to guess.  On 9/24/05, R. Alan Monroe < [EMAIL PROTECTED]> wrote:> Hi All,> I have spent an embarrassingly large amount of time trying to solve what on > its face seems like a simple prob

Re: [Tutor] Sum of List Elements

2005-09-24 Thread wkranec
how about sum()? >>> sum(range(30)) 435 -Bill ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Sum of List Elements

2005-09-24 Thread R. Alan Monroe
> Hi All, > I have spent an embarrassingly large amount of time trying to solve what on > its face seems like a simple problem. > I have a list of intergers, and I want to assign the sum of the intergers in > the list to a variable. There are only intergers in the list. > The best I have been ab