title: Python: comparing items in lists with for-loop
body: <p>I am trying to compare bunch of pair of lists and see if there is any same item in both lists with loops, but it looks like it's missing one item everytime I run it. </p>
  
  <pre><code>for item in alp: 
     for item2 in numbers: 
        if type((pos_ans[str(item) + str(item2)])) != int: 
           for item3 in (pos_ans[str(item) + str(item2)]): 
              if item3 in listing[item + "l"]: 
                 (pos_ans[str(item) + str(item2)]).remove(item3)
  </code></pre>
  
  <p><code>pos_ans[str(item) + str(item2)]</code> is one list, and <code>listing[item + "l"]</code> is another list. 
  It usually works fine, but misses one or two items sometimes. </p>