title: Is there a way of include multiple conditions in a Python next function?
body: <p>The general idea is that I want to find the first value in each list that meets any of two conditions.
  i.e.:
  ´</p>
  <pre><code>a = next((x for x in the_iterable if x &gt; 3), default_value)
  </code></pre>
  <p>However, I want it to have multiple conditions, something like:</p>
  <pre><code>a = next((x for x in the_iterable if x &gt; 3 or x-1 for x in the_iterable if x&gt;2), default_value)
  </code></pre>
  <p>My code right now looks something like:</p>
  <pre><code>a = []
  for x in iterable:
    if x&gt;3:
      a.append(x)
      break
    elif x&gt;4:
      a.append(x-1)
      break
  
  </code></pre>