title: In Python, is there a way to call a method on every item of an iterable?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1080026/is-there-a-map-without-result-in-python">Is there a map without result in python?</a>  </p>
  </blockquote>
  
  
  
  <p>I often come to a situation in my programs when I want to quickly/efficiently call an in-place method on each of the items contained by an iterable. (Quickly meaning the overhead of a for loop is unacceptable). A good example would be a list of sprites when I want to call <code>draw()</code> on each of the <code>Sprite</code> objects.</p>
  
  <p>I know I can do something like this:</p>
  
  <p><code>[sprite.draw() for sprite in sprite_list]</code></p>
  
  <p>But I feel like the list comprehension is misused since I'm not using the returned list. The same goes for the <code>map</code> function. Stone me for premature optimization, but I also don't want the overhead of the return value.</p>
  
  <p>What I want to know is if there's a method in Python that lets me do what I just explained, perhaps like the hypothetical function I suggest below:</p>
  
  <p><code>do_all(sprite_list, draw)</code></p>