title: Python equivalent of LINQ All function?
body: <p>What is the idiomatic Python way to test if all elements in a collection satisfy a condition? (The <a href="http://msdn.microsoft.com/en-us/library/bb548541.aspx">.NET <code>All()</code> method</a> fills this niche nicely in C#.)</p>
  
  <p>There's the obvious loop method:</p>
  
  <pre><code>all_match = True
  for x in stuff:
      if not test(x):
          all_match = False
          break
  </code></pre>
  
  <p>And a list comprehension could do the trick, but seems wasteful:</p>
  
  <pre><code>all_match = len([ False for x in stuff if not test(x) ]) &gt; 0
  </code></pre>
  
  <p>There's got to be something more elegant... What am I missing?</p>