title: How to delete certain element(s) from an array?
body: <p>I have a 2d array, how can I delete certain element(s) from it?</p>
  
  <pre><code>x = [[2,3,4,5,2],[5,3,6,7,9,2],[34,5,7],[2,46,7,4,36]]
  for i in range(len(x)):
      for j in range(len(x[i])):
          if x[i][j] == 2:
              del x[i][j]
  </code></pre>
  
  <p>This will destroy the array and returns error "list index out of range".</p>