Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79048
| References | <loom.20141012T190458-947@post.gmane.org> <m1g2lt$8jj$1@ger.gmane.org> <mailman.14819.1413201543.18130.python-list@python.org> <87d29wmas0.fsf@elektro.pacujo.net> |
|---|---|
| Date | 2014-10-14 00:48 +1100 |
| Subject | Re: while loop - multiple condition |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14822.1413208114.18130.python-list@python.org> (permalink) |
On Mon, Oct 13, 2014 at 11:09 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Chris Angelico <rosuav@gmail.com>:
>
>> Or, even simpler: Use an active condition.
>>
>> while input('Do you like python?') not in ('yes', 'y'): pass
>
> Instead of the traditional "pull" technology, you could take advantage
> of the state-of-the-art "push" approach:
>
> print("You must love python -- everybody does!")
Nay, there is love in excess. I thank heaven there are many pythons in
England; but if thou lovest them all, I withdraw my thanks!
-- Colonel Fairfax
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: while loop - multiple condition Chris Angelico <rosuav@gmail.com> - 2014-10-13 22:59 +1100
Re: while loop - multiple condition Marko Rauhamaa <marko@pacujo.net> - 2014-10-13 15:09 +0300
Re: while loop - multiple condition Chris Angelico <rosuav@gmail.com> - 2014-10-14 00:48 +1100
csiph-web