Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54299
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.81.MISMATCH!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <modelnine@modelnine.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.007 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'subject:both': 0.07; 'pgp': 0.09; 'skip:o 60': 0.09; 'python': 0.11; '-----begin': 0.16; '-----end': 0.16; 'gnupg': 0.16; 'hash:': 0.16; 'sha1': 0.16; 'url:enigmail': 0.16; 'comment:': 0.16; 'message-----': 0.19; 'written': 0.21; 'header:User-Agent:1': 0.23; 'skip:+ 60': 0.24; 'initial': 0.24; '---': 0.24; 'signed': 0.27; 'header:In- Reply-To:1': 0.27; 'post.': 0.31; 'skip:i 60': 0.31; 'skip:r 60': 0.31; 'actual': 0.34; 'there': 0.35; 'subject:one': 0.36; 'version:': 0.36; 'received:10': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'times': 0.62; "you've": 0.63; 'yourself': 0.78 |
| Date | Tue, 17 Sep 2013 15:46:08 +0200 |
| From | Heiko Wundram <modelnine@modelnine.org> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Having both if() and for() statements in one liner |
| References | <l19gdf$psh$1@dont-email.me> <roy-7F8454.09003417092013@news.panix.com> <l19kvs$m4q$1@dont-email.me> |
| In-Reply-To | <l19kvs$m4q$1@dont-email.me> |
| X-Enigmail-Version | 1.5.2 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.70.1379425575.18130.python-list@python.org> (permalink) |
| Lines | 29 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1379425575 news.xs4all.nl 15919 [2001:888:2000:d::a6]:41708 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:54299 |
Show key headers only | View raw
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 17.09.2013 15:21, schrieb Ferrous Cranus:
> ... there must be written on soem way.
You've already given yourself the answer in the initial post. The
Python way to write this is:
if person == "George":
for times in range(5):
...
Why not just use what works and get some actual work done?
- --
- --- Heiko.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSOF0gAAoJEDMqpHf921/Sv0oH/AyuaOk5sFlx4j7CKzv4Bb9i
+REyAtLJXpgcziviFXjIbnPsNLtGqMU6yOgp9OV7LGwfn0mnZtmI+SoYp08t7G9U
3WSMC6BOCugg419EEMmf+Gkf4fWvv/aZYWBTd8MhyiJLsQ9R7Sg9LlGYheDQ6m+S
RwWpYSHYCaJu3iy2xBJ+8AqQjOqACcMREtW1Rt1uHiydO93Dn2Abm0XLq11psYeR
OV3sftEJ2EpMEcR4I/HLx95KWIh7wvQcZywTF9y+pe1uOnLrKW/1NdkUxNdkMofy
RBNOjYJjT9JAnB2UHI1wVtbipwSi4A4zIIYsE6exv4s1IjnInrVERdDOOlqjwzQ=
=rxPO
-----END PGP SIGNATURE-----
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Having both if() and for() statements in one liner Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-09-17 15:02 +0300
Re: Having both if() and for() statements in one liner Robert Kern <robert.kern@gmail.com> - 2013-09-17 13:52 +0100
Re: Having both if() and for() statements in one liner Roy Smith <roy@panix.com> - 2013-09-17 09:00 -0400
Re: Having both if() and for() statements in one liner Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-09-17 16:21 +0300
Re: Having both if() and for() statements in one liner Heiko Wundram <modelnine@modelnine.org> - 2013-09-17 15:46 +0200
Re: Having both if() and for() statements in one liner Tim Chase <python.list@tim.thechases.com> - 2013-09-17 09:17 -0500
Re: Having both if() and for() statements in one liner Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-17 10:32 -0400
Re: Having both if() and for() statements in one liner Dave Angel <davea@davea.name> - 2013-09-17 18:54 +0000
Re: Having both if() and for() statements in one liner Steven D'Aprano <steve@pearwood.info> - 2013-09-18 02:10 +0000
Re: Having both if() and for() statements in one liner Joshua Landau <joshua@landau.ws> - 2013-09-18 06:55 +0100
Re: Having both if() and for() statements in one liner Chris Angelico <rosuav@gmail.com> - 2013-09-18 17:00 +1000
Re: Having both if() and for() statements in one liner Chris Angelico <rosuav@gmail.com> - 2013-09-18 01:04 +1000
Re: Having both if() and for() statements in one liner Joel Goldstick <joel.goldstick@gmail.com> - 2013-09-17 11:15 -0400
csiph-web