Python BUG?
Oleg Orlov
orlov at diasoft.ru
Wed Jan 12 04:52:25 EST 2000
More information about the Python-list mailing list
Wed Jan 12 04:52:25 EST 2000
- Previous message (by thread): Python BUG?
- Next message (by thread): Python BUG?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message (by thread): Python BUG?
- Next message (by thread): Python BUG?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list