title: What is the python equivalent of JavaScript's Array.prototype.some / every?
body: <p>Does python have any equivalent to JavaScript's <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/some" rel="noreferrer">Array.prototype.some</a> / <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every" rel="noreferrer">every</a>?</p>
  
  <p>Trivial JavaScript example:</p>
  
  <pre><code>var arr = [ "a", "b", "c" ];
  arr.some(function (element, index) {
      console.log("index: " + index + ", element: " + element)
      if(element === "b"){
          return true;
      }
  });
  </code></pre>
  
  <p>Will output:</p>
  
  <pre><code>index: 0, element: a
  index: 1, element: b
  </code></pre>
  
  <p>The below python seems to be functionally equivalent, but I do not know if there is a more "pythonic" approach.</p>
  
  <pre><code>arr = [ "a", "b", "c" ]
  for index, element in enumerate(arr):
      print("index: %i, element: %s" % (index, element))
      if element == "b":
          break
  </code></pre>