title: Python - alternative to list.remove(x)?
body: <p>I wish to compare two lists. Generally this is not a problem as I usually use a nested for loop and append the intersection to a new list. In this case, I need to delete the intersection of A and B from A.</p>
  
  <pre><code> A = [['ab', 'cd', 'ef', '0', '567'], ['ghy5'], ['pop', 'eye']]
  
   B = [['ab'], ['hi'], ['op'], ['ej']]
  </code></pre>
  
  <p>My objective is to compare A and B and delete A intersection B from A, i.e., delete A[0][0] in this case.</p>
  
  <p>I tried:</p>
  
  <pre><code>def match():
      for i in A:
          for j in i:
              for k in B:
                  for v in k:
                      if j == v:
                          A.remove(j)
  </code></pre>
  
  <p>list.remove(x) throws a ValueError.</p>