Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2.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.052 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:while': 0.09; 'cc:addr:python-list': 0.11; 'wrote:': 0.18; 'email addr:gmail.com>': 0.22; 'cc:addr:python.org': 0.22; 'skip': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'pass': 0.26; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; '13,': 0.31; 'probably': 0.32; 'received:google.com': 0.35; 'skip:u 10': 0.60; 'account': 0.65; 'to:addr:gmail.com': 0.65 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 :cc:content-type; bh=qvyX3WibObo3368u/biBdgeCLS+5xTyRIkj6PTs6jCs=; b=kzqMgJ+atxXle+bL1jcZO7uhAztlXaZTUDN4a5nzfSf0C96DV7nKs2TchnSKZACznl J4N4Hi3OTzrfTyJjNje5N/wFkcNMhnEBPANLqjndiVJspAPMvpU3/YqDscgjFmiAreJD +cZkxn3fWVtu8VSg4sli+NCvdFcrPOudw4f/gbDN4r5cv764ujA8q1q+1DUtH81mctkI dMc5oT5psTlIuGAWTdGSnl4vsvPOzZS3lijLc1CzB6hLZLTT6/1NNsJodEYVbqJP57DQ W7Ro/lAFbxDNx+6tt++o8pV89kM0UL+R5chN+kSEVU6laLVZuJo8IraUY4Ga99NKEksQ 9CbQ== MIME-Version: 1.0 X-Received: by 10.42.84.198 with SMTP id n6mr2611879icl.73.1413202209461; Mon, 13 Oct 2014 05:10:09 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 Oct 2014 07:10:09 -0500 Subject: Re: while loop - multiple condition From: Skip Montanaro To: Chris Angelico Content-Type: multipart/alternative; boundary=20cf301cc40ab0ef6205054cc764 Cc: "python-list@python.org" 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: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1413202212 news.xs4all.nl 2921 [2001:888:2000:d::a6]:37726 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 4480 X-Received-Body-CRC: 960459150 Xref: csiph.com comp.lang.python:79046 --20cf301cc40ab0ef6205054cc764 Content-Type: text/plain; charset=UTF-8 On Mon, Oct 13, 2014 at 6:59 AM, Chris Angelico wrote: > while input('Do you like python?') not in ('yes', 'y'): pass Unfortunately, you probably have to account for people who SHOUT: while input('Do you like python?').lower() not in ('yes', 'y'): pass Skip --20cf301cc40ab0ef6205054cc764 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

= On Mon, Oct 13, 2014 at 6:59 AM, Chris Angelico <rosuav@gmail.com> wrote:
while input('Do you like python?')= not in ('yes', 'y'): pass

Unfortunat= ely, you probably have to account for people who SHOUT:

=C2=A0 =C2=A0 while input= ('Do you like python?').lower() not in ('yes', 'y')= : pass

<wink>

Skip


--20cf301cc40ab0ef6205054cc764--