Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.093 X-Spam-Evidence: '*H*': 0.82; '*S*': 0.00; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'seems': 0.23; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'worked': 0.30; '(and': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'side': 0.61; 'subject:...': 0.63; '2013': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=gdy8CORFVNnRf0XR66KpzPKBWOPVjn78CSbJixnQFgI=; b=oLAXngDDN19BKlpAwHZMY16eAhP5Da545u6JJ9LRLpC6uQjkFORfh9XUFtvJ7CeqIt y6PKMftDJJIST/Opk+hJlEbSzQZvm82DeXL0lzH3T947kXRBd0mcV8BjLCVqb9YA0zh7 RXpiKkzioZKMYV6WWOWxGCTTQaT7gV7uE2LijK1weFncZy/Lp+rlQImk7cWih2UzGYTv LdXw+PdexK9DLwLpHPP0IxygCMu794dEN5tRg/LelidfcbBAbefxCQeygYXF9lE4IVvO +o4kVX2mTYLBKVICqqhoEcoSYfUYwGrH5g2yRr1Dt2Oj5pKXOo8hL7zDj3V3AVNekrGo Jm8A== MIME-Version: 1.0 In-Reply-To: <39abb4d2-277a-4ac9-8574-0d3e3751b7ef@googlegroups.com> References: <2f5053ab-a646-49d3-a569-61468f518b9f@googlegroups.com> <39abb4d2-277a-4ac9-8574-0d3e3751b7ef@googlegroups.com> Date: Wed, 2 Jan 2013 09:01:12 +1100 Subject: Re: Considering taking a hammer to the computer... 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357077680 news.xs4all.nl 6896 [2001:888:2000:d::a6]:36352 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35922 On Wed, Jan 2, 2013 at 7:14 AM, wrote: > floor_number = 0 > for i in range(number_of_floors): > floor_number = floor_number + 1 Matt's already given you the part you need (and it seems to have worked for you, yay!). Side point: Are you aware that i and floor_number are always going to have the same value? You can simplify this down to: for floor_number in range(number_of_floors): ChrisA