Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'mathematics': 0.05; 'string': 0.09; 'subject:number': 0.09; 'sure,': 0.09; 'cc:addr :python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'input:': 0.16; 'intersection': 0.16; 'mark.': 0.16; 'math,': 0.16; 'output?': 0.16; 'roy': 0.16; 'wrote:': 0.18; 'things.': 0.19; 'input': 0.22; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'programming.': 0.30; 'subject:list': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'stuff': 0.32; 'subject:the': 0.34; 'but': 0.35; 'received:google.com': 0.35; "i'll": 0.36; 'two': 0.37; 'does': 0.39; 'even': 0.60; 'more': 0.64; 'different': 0.65; 'smith': 0.68; 'subject:get': 0.81; 'to:none': 0.92 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:cc :content-type; bh=7i4ELkpaYs8AcLjas+1RL50JyoihGwymLR+l+UmXbEs=; b=FqfRRUTqTQbGOvL6qOLsQJgZV+XwP0HA2HIVGbEARrIDhkHqYvGaSvmbnuLDDz8mdj kU+C71uIiL/mZgO2TIBHpzD8tvfzXjB0bp5+U0hOLS7zcpNtw2w9UuRzdsJ9Kwhig3Fq oJWTdW9luIv3b4YhMLZ5ceMElPbeaXe94tzzmgQBBrniv1pk3b4/4wUmhVxtRDPWAorQ lgU2t+Cobf86RoXtY75jtlldZBgUR/spdvD5jY0BjyhbmJIoNS3mYexx1uLxj/zY7EnY Z8T46jrJGVJi+3fjdq4sS2dmHhIV3LOznkvfPMQd1tzF+6IUV9l3nvLviiKHqUEDNBMn 8mTg== MIME-Version: 1.0 X-Received: by 10.42.107.145 with SMTP id d17mr27725199icp.61.1407710604640; Sun, 10 Aug 2014 15:43:24 -0700 (PDT) In-Reply-To: References: <53E658CD.5020904@gmail.com> <53e59035$0$29998$c3e8da3$5496439d@news.astraweb.com> <338e8fb0-c9ec-462a-b560-1c1ff77de17e@googlegroups.com> <154cc342-7f85-4d16-b636-a1a953913c98@googlegroups.com> <8c41d779-0c26-430a-a915-08c2b962e0e7@googlegroups.com> Date: Mon, 11 Aug 2014 08:43:24 +1000 Subject: Re: how to get the ordinal number in list From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 1407710607 news.xs4all.nl 2953 [2001:888:2000:d::a6]:52047 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:76007 On Mon, Aug 11, 2014 at 8:01 AM, Roy Smith wrote: > I'm with Mark. This isn't math, it's programming. Sure, the > intersection of the two is non-null, but they are different things. > I'll often do things like: > > for line in input: > line = line.strip() > # do more stuff What does mathematics even have as a concept of looping? String manipulation? Input and output? ChrisA