Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.188 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.65; '*S*': 0.02; 'initialize': 0.07; 'subject:Help': 0.11; '05:42': 0.16; 'bumping': 0.16; 'loop.': 0.16; 'normally,': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'print': 0.22; 'header:User-Agent:1': 0.23; 'header:In-Reply- To:1': 0.27; 'context,': 0.31; 'add': 0.35; 'two': 0.37; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'skip:u 10': 0.60; 'new': 0.61; "you're": 0.61; 'email addr:gmail.com': 0.63; 'sum': 0.64; 'total': 0.65; 'different': 0.65; 'copies.': 0.68; 'received:74.208': 0.68; 'subject': 0.69; 'received:74.208.4.194': 0.84; 'reply,': 0.93 Date: Mon, 01 Apr 2013 18:28:17 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Help References: <8fb27db9-e745-449e-b7f6-e30493f05b35@googlegroups.com> In-Reply-To: <8fb27db9-e745-449e-b7f6-e30493f05b35@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:dA56GDpwEvjLemlsMNGTehpAcjQKlfIoOPeXd9eqaqo 1nMZQJ7fuJ8WPU7czDhleB3q9sAdgaHOhGBV2cT2yyGHmBwGBN EOPrcFwimt6CgrpiLPLWXd8aRZYS16VveGpq9hQYyI3jcA8xdP apfR7eAwMUQcYsmSri9Xs+7YziNK/9XKmmoXI/hjIpZQNT3X5j OpA8WWibHLJ5jejR+5Onmhpf9tt+tHlvMsVpmy4ILRLkrnqp+a 4jdae6xWEnN7hGPo/h+3cA0zyp6WSGBYH0BREHLmeUwWltg7Kq it+P6TuqbfbVUCssaW2oI4BOyd8ZVKvc1d2aDdJrF2ZmlhCLQ= = X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364855320 news.xs4all.nl 6951 [2001:888:2000:d::a6]:52209 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42515 On 04/01/2013 05:42 PM, khaosyt@gmail.com wrote: > Self-bump > Normally, bumping a message/thread means replying to it. You're leaving a NEW message with no context, no reply, and a different uninformative subject line. And you're leaving it from googlegroups, with two copies. If you want to sum things through a loop, initialize a variable to zero before the loop, then add to it each time through the loop. total=0 for whatever in something: total += whatever_expression print total -- DaveA