Python BUG?

Oleg Orlov orlov at diasoft.ru
Wed Jan 12 04:52:25 EST 2000


Thanks. It helps.
My right way was:

d = [1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L,
    10L, 9L, 8L, 7L, 6L, 5L, 4L, 3L, 2L, 1L]
d = map(lambda x: x*x, d)
print reduce(lambda x, y: x + y, d)

or even
print reduce(lambda x, y: x + y*y, d, 0)

 --
 ====================
 Oleg Orlov
 orlov at diasoft.ru








More information about the Python-list mailing list