title: Find the first N elements of a list, until a condition is satisfied
body: <p>I have a list of objects, and I want to take the beginning of the list up until the first object that meets a simple condition (like <code>imp[1] == 'conversion'</code> when <code>imp</code> is some element in the list).</p>
  
  <p>An easy way would be: initialize a new list, iterate through the original list, and at each step append the current element and check the condition on the current element. If the condition is not satisfied then continue, and if it is satisfied then break.</p>
  
  <pre><code>new_list = []
  for ele in old_list:
      new_list.append(ele)
      if condish(ele):
          break
  </code></pre>
  
  <p>But this seems inefficient in memory, runtime, and code (the big three!).</p>