Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!newsfeed101.telia.com!starscream.dk.telia.net!news.tele.dk!news.tele.dk!small.news.tele.dk!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.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'loops': 0.16; 'nest': 0.16; 'possible?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:make': 0.16; 'subject:run': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'url:moin': 0.24; 'this:': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'url:wiki': 0.31; 'run': 0.32; 'url:python': 0.33; 'but': 0.35; 'subject:?': 0.36; 'url:org': 0.36; 'url:library': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'url:3': 0.61; "you're": 0.61; 'charset:windows-1252': 0.65; 'yes': 0.68; 'reverse': 0.68; 'subject:you': 0.87; 'email addr:hotmail.com': 0.89 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: how do you make a loop run in reverse? Date: Wed, 27 Mar 2013 00:18:13 +0000 References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: host-92-18-20-125.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: X-Antivirus: avast! (VPS 130326-1, 26/03/2013), Outbound message X-Antivirus-Status: Clean 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364343375 news.xs4all.nl 6970 [2001:888:2000:d::a6]:53593 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41966 On 26/03/2013 23:59, rahulreddy24@hotmail.com wrote: > So i have a set of for loops that create this : > snipped the art > > but i want to nest all the loops under one BIG loop that'll run in reverse to make this: > snipped the art > > Is this possible? > Yes read http://docs.python.org/3/library/stdtypes.html#range and http://docs.python.org/3/library/functions.html#reversed -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence