Chris Angelico writes:
> On Thu, May 9, 2013 at 9:30 PM, Jussi Piitulainen wrote:
> > 8 Dihedral writes:
> >
> >> This is just the handy style for a non-critical loop.
> >> In a critical loop, the number of the total operation counts
> >> does matter in the execution speed.
> >
> > Do you use
On Sun, May 12, 2013 at 12:29 PM, 8 Dihedral
wrote:
> Chris Angelico於 2013年5月12日星期日UTC+8上午12時00分44秒寫道:
>> Most humans would get defensive, or at
>> least protest, if treated as bots; Dihedral never has, despite being
>> referred to in this way a number of times.
>>
>> ChrisA
>
> Don't you get
Chris Angelico於 2013年5月12日星期日UTC+8上午12時00分44秒寫道:
> On Sun, May 12, 2013 at 1:47 AM, Anssi Saari wrote:
>
> > Chris Angelico writes:
>
> >
>
> >> On Thu, May 9, 2013 at 9:30 PM, Jussi Piitulainen
>
> >> wrote:
>
> >>> 8 Dihedral writes:
>
> >>>
>
> This is just the handy style for
On Sun, May 12, 2013 at 1:47 AM, Anssi Saari wrote:
> Chris Angelico writes:
>
>> On Thu, May 9, 2013 at 9:30 PM, Jussi Piitulainen
>> wrote:
>>> 8 Dihedral writes:
>>>
This is just the handy style for a non-critical loop.
In a critical loop, the number of the total operation coun
Chris Angelico writes:
> On Thu, May 9, 2013 at 9:30 PM, Jussi Piitulainen
> wrote:
>> 8 Dihedral writes:
>>
>>> This is just the handy style for a non-critical loop.
>>> In a critical loop, the number of the total operation counts
>>> does matter in the execution speed.
>>
>> Do you use sp
On Thu, May 9, 2013 at 9:30 PM, Jussi Piitulainen
wrote:
> 8 Dihedral writes:
>
>> This is just the handy style for a non-critical loop.
>> In a critical loop, the number of the total operation counts
>> does matter in the execution speed.
>
> Do you use speed often?
Dihedral is a bot. Quite
Jussi Piitulainen於 2013年5月9日星期四UTC+8下午7時30分05秒寫道:
> 8 Dihedral writes:
>
>
>
> > This is just the handy style for a non-critical loop.
>
> > In a critical loop, the number of the total operation counts
>
> > does matter in the execution speed.
>
>
>
> Do you use speed often?
There i
8 Dihedral writes:
> This is just the handy style for a non-critical loop.
> In a critical loop, the number of the total operation counts
> does matter in the execution speed.
Do you use speed often?
--
http://mail.python.org/mailman/listinfo/python-list
Jussi Piitulainen於 2013年5月9日星期四UTC+8下午2時55分20秒寫道:
> RAHUL RAJ writes:
>
>
>
> > Checkout the following code:
>
> >
>
> > sample2 = [x+y for x in range(1,10) for y in range(1,10) if x!=y]
>
> > output=[]
>
> > output=[x for x in sample2 if x not in output]
>
> >
>
> > the output I get
On Thu, 09 May 2013 01:18:51 -0700, RAHUL RAJ wrote:
> Then what about this code part?
What about it?
> [(x, y) for x in [1,2,3] for y in [3,1,4] if x != y]
>
> and the following code part:
>
> for x in [1,2,3]:
> for y in [3,1,4]:
> if x != y:
> combs.append((x, y))
Apart from
I'm getting same output for both code parts, why not for th code parts in
question?
On Thursday, May 9, 2013 1:48:51 PM UTC+5:30, RAHUL RAJ wrote:
> Then what about this code part?
>
>
>
> [(x, y) for x in [1,2,3] for y in [3,1,4] if x != y]
>
>
>
> and the following code part:
>
>
>
> f
Then what about this code part?
[(x, y) for x in [1,2,3] for y in [3,1,4] if x != y]
and the following code part:
for x in [1,2,3]:
for y in [3,1,4]:
if x != y:
combs.append((x, y))
On Thursday, May 9, 2013 12:24:24 PM UTC+5:30, Gary Herron wrote:
> On 05/08/2013 11:36 PM, RAHUL RA
On Thu, May 9, 2013 at 4:36 PM, RAHUL RAJ wrote:
> output=[x for x in sample2 if x not in output]
>
> output=[]
> for x in sample2:
> if x not in output:
> output.append(x)
The first one constructs a list, then points the name 'output' at it.
The second one builds up a list, with 'output'
On 05/08/2013 11:36 PM, RAHUL RAJ wrote:
Checkout the following code:
sample2 = [x+y for x in range(1,10) for y in range(1,10) if x!=y]
output=[]
output=[x for x in sample2 if x not in output]
This statement is not doing what you expect. It is not building a list
in the variable named outpu
RAHUL RAJ writes:
> Checkout the following code:
>
> sample2 = [x+y for x in range(1,10) for y in range(1,10) if x!=y]
> output=[]
> output=[x for x in sample2 if x not in output]
>
> the output I get is
> 3 4 5 6 7 8 9 10 3 5 6 7 8 9 10 11 4 5 7 8 9 10 11 12 5 6 7 9 10 11
> 12 13 6 7 8 9 11
Checkout the following code:
sample2 = [x+y for x in range(1,10) for y in range(1,10) if x!=y]
output=[]
output=[x for x in sample2 if x not in output]
the output I get is
3 4 5 6 7 8 9 10 3 5 6 7 8 9 10 11 4 5 7 8 9 10 11 12 5 6 7 9 10 11 12 13 6 7 8
9 11 12 13 14 7 8 9 10 11 13 14 15 8 9 10
16 matches
Mail list logo