[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LFM + LFSP = LFE?



Bryn Keller wrote:
> ...
> 
> Python:
> 
> map(mul, [1,2,3], [1,2,3])

Alternately:

 >>> [x * y for x,y in zip([1,2,3],[1,2,3])]
[1, 4, 9]

List comprehensions can do everything map can do (perhaps modulo special 
cases involving unevenly sized lists) and more.

  Paul Prescod