Ziga Seilnach: >c = map(operator.mul, a, b) Usually I like map a lot, but this time for me the l.c. version is a bit simpler to understand (even if it's longer, and maybe slower too):
>>> from operator import mul >>> from itertools import izip >>> a = [1, 2, 3] >>> b = [4, 5, 6] >>> map(mul, a, b) [4, 10, 18] >>> [arow * brow for arow, brow in izip(a, b)] [4, 10, 18] Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list