Having both if() and for() statements in one liner

Heiko Wundram modelnine at modelnine.org
Tue Sep 17 09:46:08 EDT 2013


-----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-----



More information about the Python-list mailing list