John Machin wrote:
Instead of sum(a + b for a, b in zip(foo, bar))
why not use sum(foo) + sum(bar)
?
or even sum(foo+bar) as may apply.
Cheers, BB
--
http://mail.python.org/mailman/listinfo/python-list
Le Monday 23 June 2008 11:39:44 Boris Borcic, vous avez écrit :
John Machin wrote:
Instead of sum(a + b for a, b in zip(foo, bar))
why not use sum(foo) + sum(bar)
?
or even sum(foo+bar) as may apply.
Because some are better than others :
sum(foo+bar) is the worst, it create a
On Jun 23, 9:16 pm, Maric Michaud [EMAIL PROTECTED] wrote:
Le Monday 23 June 2008 11:39:44 Boris Borcic, vous avez écrit :
John Machin wrote:
Instead of sum(a + b for a, b in zip(foo, bar))
why not use sum(foo) + sum(bar)
?
or even sum(foo+bar) as may apply.
Because some are
Le Monday 23 June 2008 13:51:34 John Machin, vous avez écrit :
On Jun 23, 9:16 pm, Maric Michaud [EMAIL PROTECTED] wrote:
Le Monday 23 June 2008 11:39:44 Boris Borcic, vous avez écrit :
John Machin wrote:
Instead of sum(a + b for a, b in zip(foo, bar))
why not use sum(foo) + sum(bar)
[a+b for a,b in zip(xrange(1,51), xrange(50,0,-1))]
[51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51]
i want to add all the elemtns a s well. can
On Jun 22, 6:32 pm, cirfu [EMAIL PROTECTED] wrote:
[a+b for a,b in zip(xrange(1,51), xrange(50,0,-1))]
[51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
On Jun 23, 10:32 am, cirfu [EMAIL PROTECTED] wrote:
[a+b for a,b in zip(xrange(1,51), xrange(50,0,-1))]
[51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
On Jun 23, 9:23 am, Paul Hankin [EMAIL PROTECTED] wrote:
On Jun 23, 10:32 am, cirfu [EMAIL PROTECTED] wrote:
[a+b for a,b in zip(xrange(1,51), xrange(50,0,-1))]
[51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,