J Kenneth King <ja...@agentultra.com> writes: > Steven D'Aprano <ste...@remove.this.cybersource.com.au> writes: > > > from operator import add > > map(add, operandlist1, operandlist2) > > This is the best solution so far.
Strange to say it's a solution, when it doesn't solve the stated problem: to replace use of ‘map()’ with a list comprehension. > I understand the OP was asking for it, but list comprehensions aren't > the best solution in this case... it would just be line noise. I disagree; a list comprehension is often clearer than use of ‘map()’ with a lambda form, and I find it to be so in this case. -- \ “He may look like an idiot and talk like an idiot but don't let | `\ that fool you. He really is an idiot.” —Groucho Marx | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list