On Feb 14, 2006, at 3:46 PM, Andre Roberge wrote:

> [2**i for i in [1, 2, 3, 4]]

Ah yes, I'm sorry, I was thinking of the most general case, where the  
arguments are
two arbitrary lists. My example was too specific.

Is there a way to do something like the following in a list  
comprehension?

map(pow, [1, 7, 6, 2], [3, 8, 2, 5])

Mike

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to