Is there a value in using map() vs for?

Posted by roder on Stack Overflow See other posts from Stack Overflow or by roder
Published on 2009-05-17T19:45:43Z Indexed on 2010/04/08 18:43 UTC
Read the original article Hit count: 249

Filed under:
|
|
|

Does map() iterate through the list like "for" would? Is there a value in using map vs for?

If so, right now my code looks like this:

for item in items:
    item.my_func()

If it makes sense, I would like to make it map(). Is that possible? What is an example like?

© Stack Overflow or respective owner

Related posts about python

Related posts about map