title: ValueError when checking if tuple occurs in list of tuples
body: <p>When I am running my code I suddenly get an unexpected error:
  <code>ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()</code></p>
  <p>I am trying to check if a tuple occurs within a list:</p>
  <pre><code>concat_tuples = [(7, 18), (7, [0, 10, 19]), (7, 16)]
  to_explode = [c for c in concat_tuples if any(isinstance(x, list) and 
                len(x) &gt; 1 for x in c)]
  # &gt;&gt; to_explode = [(7, [0, 10, 19])]
  not_explode = [x for x in concat_tuples if x not in to_explode]
  </code></pre>
  <p>However, my last line of code fails in my script for the first value (and probably also for the other values). The weird thing is that it works in my Python console, but not in my script (pytests). What could be going wrong in my script?</p>
  <p><strong>What I have tried</strong></p>
  <ul>
  <li>Checking existence in list with <code>list.index()</code>. This also fails with the same error</li>
  <li>Checked types of both x and to_explode, they're a tuple and list of tuples respectively</li>
  <li>Reformatted the code: list comprehension to regular for-loop, still no success</li>
  <li>Run the code in Python console, which works</li>
  </ul>