Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104998
| From | "Sven R. Kunze" <srkunze@mail.de> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | empty clause of for loops |
| Date | 2016-03-16 11:23 +0100 |
| Message-ID | <mailman.186.1458123807.12893.python-list@python.org> (permalink) |
Hi,
a colleague of mine (I write this mail because I am on the list) has the
following issue:
for x in my_iterable:
# do
empty:
# do something else
What's the most Pythonic way of doing this?
Best,
Sven
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
empty clause of for loops "Sven R. Kunze" <srkunze@mail.de> - 2016-03-16 11:23 +0100
Re: empty clause of for loops Steven D'Aprano <steve@pearwood.info> - 2016-03-16 23:08 +1100
Re: empty clause of for loops "Sven R. Kunze" <srkunze@mail.de> - 2016-03-16 15:44 +0100
Re: empty clause of for loops André Roberge <andre.roberge@gmail.com> - 2016-03-16 05:41 -0700
Re: empty clause of for loops Steven D'Aprano <steve@pearwood.info> - 2016-03-16 23:59 +1100
Re: empty clause of for loops Peter Otten <__peter__@web.de> - 2016-03-16 14:04 +0100
Re: empty clause of for loops Palpandi <palpandi111@gmail.com> - 2016-03-18 12:10 -0700
csiph-web