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.162 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.77; '*S*': 0.09; 'subject: + ': 0.07; 'def': 0.12; 'count.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'mon,': 0.24; 'header:In-Reply- To:1': 0.27; 'subject:) ': 0.29; 'message-id:@mail.gmail.com': 0.30; 'asked': 0.31; 'correctly.': 0.31; 'received:google.com': 0.35; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; 'total': 0.65; 'frequently': 0.68; 'subject:here': 0.84; 'subject:Lists': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=LpPuBw9zNIRjW4aQcwGntxMP/nseVNGrVDcUildb/gA=; b=gfMK5NdurJTRBZT/prbh/Sc6xvh9XVmG99CzFUD1x4BnNvmQFtwt07+FY3xhHgmvq/ izTkCSum9p1rQOsUCgGgunw8QlbiOcVLY6E5XeqA5oMkn5SbcOuMvW91pK7t6sXJRS8D og5KteNDUZy+fMwNRpnZGZw4FtLzQ44lupi0rZxKOaRNfoU82XB9u+besXoVXjjy93Jf AQq+Hd84f+ruWQ+D4nD3rr/mfbvbm5pVEKV1urUt4rkolDy6E5uWipXV3GIrgLOcRSjD T7MCtdj5DK40h4vAKmlzm7IFQ4lauvRcZHT+CaHrgOmNnqjjBPlm1fajFaQ5P1pgwR9o ZHjA== MIME-Version: 1.0 X-Received: by 10.58.56.161 with SMTP id b1mr6493459veq.42.1367825543520; Mon, 06 May 2013 00:32:23 -0700 (PDT) In-Reply-To: <3a5447e4-4f20-45bb-be22-cf820f2c7737@googlegroups.com> References: <3a5447e4-4f20-45bb-be22-cf820f2c7737@googlegroups.com> Date: Mon, 6 May 2013 17:32:23 +1000 Subject: Re: (Learner-here) Lists + Functions = headache From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=Big5 Content-Transfer-Encoding: quoted-printable 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367825546 news.xs4all.nl 15998 [2001:888:2000:d::a6]:56700 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44805 On Mon, May 6, 2013 at 3:39 PM, 88888 Dihedral wrote: > Bradley Wright=A9=F3 2013=A6~5=A4=EB6=A4=E9=ACP=B4=C1=A4@UTC+8=A4W=A4=C88= =AE=C959=A4=C015=AC=ED=BCg=B9D=A1G >> def fizz_cout(x): >> >> count =3D 0 >> >> for item in x: >> >> while item =3D=3D "fizz": >> >> count +=3D 1 >> > >> return count >> > This is not indented right in the scope to return > the total count. Wow. You know a question's been asked frequently when even the bots can learn to answer it correctly. ChrisA