On Wed, Sep 18, 2013 at 3:55 PM, Joshua Landau wrote:
> range(person == "simon" and 5)
+1 for the BOFH reference.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On 18 September 2013 03:10, Steven D'Aprano wrote:
> On Tue, 17 Sep 2013 18:54:51 +, Dave Angel wrote:
>
>> for times in range(0, 5 if person=="George" else 0):
>
>
> Oh that is evil. Truly evil.
>
> Thank you, I will treasure that piece of code forever.
range(person == "simon" and 5)
--
htt
On Tue, 17 Sep 2013 18:54:51 +, Dave Angel wrote:
> for times in range(0, 5 if person=="George" else 0):
Oh that is evil. Truly evil.
Thank you, I will treasure that piece of code forever.
--
Steven
--
https://mail.python.org/mailman/listinfo/python-list
On 17/9/2013 09:21, Ferrous Cranus wrote:
> I just want to say tot he program that
>
> that only run the for statement if and only if person=='George'
>
> I dont see nay reason as to why this fails
>
> perhaps like:
>
> for times in range(0, 5) if person=='George':
>
> but that fails too...
> the
On Tue, Sep 17, 2013 at 11:04 AM, Chris Angelico wrote:
> On Tue, Sep 17, 2013 at 11:00 PM, Roy Smith wrote:
> > They just discovered a huge newline vein in Montana and they're mining
> > the things like crazy. There's no shortage of them so feel free to use
> > as many as you like. They even
On Tue, Sep 17, 2013 at 11:00 PM, Roy Smith wrote:
> They just discovered a huge newline vein in Montana and they're mining
> the things like crazy. There's no shortage of them so feel free to use
> as many as you like. They even get recycled.
Can they keep up with the considerable demand even
On Tue, Sep 17, 2013 at 10:17 AM, Tim Chase
wrote:
> On 2013-09-17 16:21, Ferrous Cranus wrote:
> > I just want to say tot he program that
> >
> > that only run the for statement if and only if person=='George'
> >
> > I dont see nay reason as to why this fails
> >
> > perhaps like:
> >
> > for ti
On 2013-09-17 16:21, Ferrous Cranus wrote:
> I just want to say tot he program that
>
> that only run the for statement if and only if person=='George'
>
> I dont see nay reason as to why this fails
>
> perhaps like:
>
> for times in range(0, 5) if person=='George':
>
> but that fails too...
>
-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 no
Στις 17/9/2013 4:00 μμ, ο/η Roy Smith έγραψε:
In article ,
Ferrous Cranus wrote:
o want to avoid having to type somehting like this:
if person="George":
times in range(0, 5):
Why it gives me an error when i'm trying to write it like this:
if person="George" for times in range(0,
In article ,
Ferrous Cranus wrote:
> o want to avoid having to type somehting like this:
>
> if person="George":
> times in range(0, 5):
>
>
> Why it gives me an error when i'm trying to write it like this:
>
>
> if person="George" for times in range(0, 5):
Step One when reporting a
On 2013-09-17 13:02, Ferrous Cranus wrote:
o want to avoid having to type somehting like this:
if person="George":
times in range(0, 5):
Why it gives me an error when i'm trying to write it like this:
if person="George" for times in range(0, 5):
Can't i ahve both if and for in a one li
o want to avoid having to type somehting like this:
if person="George":
times in range(0, 5):
Why it gives me an error when i'm trying to write it like this:
if person="George" for times in range(0, 5):
Can't i ahve both if and for in a one liner?
--
https://mail.python.org/mailman/l
13 matches
Mail list logo