title: Find first sequence item that matches a criterion
body: <p>What would be the most elegant and efficient way of finding/returning the first list item that matches a certain criterion?</p>
  
  <p>For example, if I have a list of objects and I would like to get the first object of those with attribute <code>obj.val==5</code>. I could of course use list comprehension, but that would incur O(n) and if n is large, it's wasteful. I could also use a loop with <code>break</code> once the criterion was met, but I thought there could be a more pythonic/elegant solution.</p>