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


Groups > comp.lang.python > #79122

Re: while loop - multiple condition

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.szaf.org!feedme.news.telefonica.de!telefonica.de!diesel.cu.mi.it!.POSTED!not-for-mail
From giacomo boffi <pecore@pascolo.net>
Newsgroups comp.lang.python
Subject Re: while loop - multiple condition
Date Wed, 15 Oct 2014 01:04:42 +0200
Organization The Sun and the Rain.
Lines 15
Message-ID <87oatel0c5.fsf@pascolo.net> (permalink)
References <loom.20141012T190458-947@post.gmane.org> <CAPTjJmrPgTdysCnLcbMqYFiGGwg-wV_mjfw16Kt15_zuv_624g@mail.gmail.com> <loom.20141012T191849-946@post.gmane.org> <CAPTjJmouQsm_9ccqdtmJ3kmd4SqmmOqk3OVdS4mngeHaVT2S6w@mail.gmail.com> <loom.20141012T195709-937@post.gmane.org> <mailman.14798.1413137019.18130.python-list@python.org> <878uklcd3r.fsf@elektro.pacujo.net> <mailman.14805.1413146405.18130.python-list@python.org>
NNTP-Posting-Host ppp-30-13.21-151.libero.it
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace virtdiesel.mng.cu.mi.it 1413327883 25777 151.21.13.30 (14 Oct 2014 23:04:43 GMT)
X-Complaints-To abuse@diesel.cu.mi.it
NNTP-Posting-Date Tue, 14 Oct 2014 23:04:43 +0000 (UTC)
User-Agent Gnus/5.101 (Gnus v5.10.10) XEmacs/21.5-b34 (linux)
Cancel-Lock sha1:MDGNAl63jVABrknxOdgtcH0sGXw=
Xref csiph.com comp.lang.python:79122

Show key headers only | View raw


Tim Chase <python.list@tim.thechases.com> writes:

> On 2014-10-12 22:16, Marko Rauhamaa wrote:
>> is equivalent with
>> 
>>     while ans.lower()[0] != 'y':
>>          ans = input('Do you like python?')
>
> And still better improved with
>
>   while ans[:1].lower() != 'y':
>     ans = input('Do you like python?')

 yok is Turkish for an EMPHATIC NO
(or, at least, that's what I was led to think many years ago)

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


Thread

Re: while loop - multiple condition Chris Angelico <rosuav@gmail.com> - 2014-10-13 05:03 +1100
  Re: while loop - multiple condition Marko Rauhamaa <marko@pacujo.net> - 2014-10-12 22:16 +0300
    Re: while loop - multiple condition Chris Angelico <rosuav@gmail.com> - 2014-10-13 06:22 +1100
    Re: while loop - multiple condition Tim Chase <python.list@tim.thechases.com> - 2014-10-12 15:42 -0500
      Re: while loop - multiple condition Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-13 09:56 +1100
        Re: while loop - multiple condition Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-10-13 09:12 -0700
          Re: while loop - multiple condition Rustom Mody <rustompmody@gmail.com> - 2014-10-13 09:26 -0700
            Re: while loop - multiple condition Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-10-13 09:43 -0700
              Re: while loop - multiple condition Rustom Mody <rustompmody@gmail.com> - 2014-10-13 10:12 -0700
                Re: while loop - multiple condition Michael Torrie <torriem@gmail.com> - 2014-10-13 16:08 -0600
                Re: while loop - multiple condition wxjmfauth@gmail.com - 2014-10-13 23:34 -0700
      Re: while loop - multiple condition giacomo boffi <pecore@pascolo.net> - 2014-10-15 01:04 +0200
        Re: while loop - multiple condition Chris Angelico <rosuav@gmail.com> - 2014-10-15 10:16 +1100

csiph-web