Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #79047

Re: while loop - multiple condition

References <loom.20141012T190458-947@post.gmane.org> <m1g2lt$8jj$1@ger.gmane.org> <CAPTjJmrQ4utEQa_2EUFAWLY4R8knodkq6WK09YD3asUMvmUyiQ@mail.gmail.com> <CANc-5UxHXky7f4ALJheUvH10KPzUNMMeLAD3XSZb=zdEnN-gjg@mail.gmail.com>
Date 2014-10-14 00:46 +1100
Subject Re: while loop - multiple condition
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.14821.1413208016.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, Oct 13, 2014 at 11:10 PM, Skip Montanaro
<skip.montanaro@gmail.com> wrote:
> 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
>
>
> Unfortunately, you probably have to account for people who SHOUT:
>
>     while input('Do you like python?').lower() not in ('yes', 'y'): pass
>
> <wink>

Welcome to collaborative editing. I make a change and introduce a bug.
Fortunately, someone else can, just like that, fix that bug. Thanks!
:)

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: while loop - multiple condition Chris Angelico <rosuav@gmail.com> - 2014-10-14 00:46 +1100

csiph-web