Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.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.064 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'second.': 0.09; 'subject:while': 0.09; 'subject:python': 0.11; 'columns': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject: \n ': 0.16; 'wrote:': 0.17; 'header:In-Reply-To:1': 0.25; 'raw': 0.27; 'message-id:@mail.gmail.com': 0.27; 'indentation': 0.29; 'fri,': 0.30; 'code': 0.31; 'to:addr:python- list': 0.33; 'agree': 0.34; 'received:google.com': 0.34; 'third': 0.34; 'pm,': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'should': 0.36; 'subject: (': 0.36; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'your': 0.60; 'subject': 0.66; '2013': 0.84; 'isaac': 0.84; 'won': 0.96 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; bh=Ec6/gkx5o7p0fLuujQAkHdmVjeXTSmBneLhc9i80tn8=; b=uzf2ChOw4BEt9L9xAs2olBXK87QzI1/TFmCTvtkdqbhG3YngTjWy9oNDfkNQr3nDXs CMnYlk+lKZpgLFG9tCziilBt6PaCBivbWydP9nYw/+Q3KQ+GAKS+wGcfCFHfECZQ2v4L kaypZRza/FEUYr2srjqMss5EPovsh85Jomta/rjb92/J7Sbr+ViVzxyQVGQFHvr78SjW vLOotGLClPowEoJWJZ4gsop4F/A6Ikfy3eIGmM2vY0rrJYudZU6nnsSFBMs7yBuaY8DH osjk0x1Zus/5nxpwG8/b7ACRAeToF5Fzl4tZcdhr5/Wg7x/7JeWswtV83Rg+JRk/kVoV wImQ== MIME-Version: 1.0 X-Received: by 10.220.219.77 with SMTP id ht13mr3945339vcb.66.1362145265667; Fri, 01 Mar 2013 05:41:05 -0800 (PST) In-Reply-To: <118003ed-33f6-4d99-ac5e-99ec81921f45@googlegroups.com> References: <118003ed-33f6-4d99-ac5e-99ec81921f45@googlegroups.com> Date: Sat, 2 Mar 2013 00:41:05 +1100 Subject: Re: Triple nested loop python (While loop insde of for loop inside of while loop) From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362145274 news.xs4all.nl 6930 [2001:888:2000:d::a6]:52280 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40250 On Fri, Mar 1, 2013 at 7:59 PM, Isaac Won wrote: > while c <24: > for columns in ( raw.strip().split() for raw in f ): > while d <335: Note your indentation levels: the code does not agree with your subject line. The third loop is not actually inside your second. Should it be? ChrisA