title: How to return the index of the first non-negative list in a list of lists in Python?
body: <p>The desired output is the index of the first non-negative list.</p>
  
  <p>Say I nested list of numbers like below. I am trying to figure out how to remove the values of the negative lists or just return the index where all the values in the list are positive.</p>
  
  <p>My idea was to enumerate or loop a function that checks if a list has a negative value then pop or remove from the list of lists</p>
  
  <p>Or do I use a list comprehension?</p>
  
  <pre><code># pseudocode
  x = [[-1, -2, -1], [-1, -3, -1], [1, 2, 2]]
  index_x = [x.index(non_negative(x)) for x in data]
  print(index_x)
  # 2 
  </code></pre>