Le Wed, 29 Jun 2005 09:46:15 +0000 (UTC), Mandus a écrit : > Hi there, > > inspired by a recent thread where the end of reduce/map/lambda in Python was > discussed, I looked over some of my maps, and tried to convert them to > list-comprehensions. > > This one I am not sure how to conver: > > Given three tuples of length n, b,i and d, I now do: > > map(lambda bb,ii,dd: bb+ii*dd,b,i,d) > > which gives a list of length n.
res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ] Hoping that zip will not be deprecated. -- http://mail.python.org/mailman/listinfo/python-list