title: Removing an index from a list if it contains a specific value
body: <p>Im looking to remove several indices from a list, and want to filter them by content. For example:</p>
  
  <pre><code>L= [(1, 2, 3), (etc, etc, etc), (......)]
  if L[i] == 1:
      L[i] == nan
  &gt;&gt;&gt;L
  [(nan), (etc, etc.......]
  </code></pre>
  
  <p>I know this code isn't correct, but it's just an example to help iterate what I want to do, any help is appreciated, thanks.</p>