How can I test two elements of one list and if they are equivalent place the element of one list into a new list
<p>I have 3 lists:</p>

<pre><code>neighbour = []
scanned = [[],[]]   
localisation = [[],[],[]] 
</code></pre>

<p>I want to test each item in the 0th sublist (column) of the scanned list to see if it is equivalent to any of the items in the neighbour list.</p>

<p>If it is equivalent I want to append both sublists of scanned to the 1st and 2nd sublists of localisation.</p>

<p>I believe this test will check if an item in the 0th sublist in scanned matches any items in the neighbour sublist:</p>

<pre><code>for i in scanned[0]:
    for j in neighbour:
        if i == j:
</code></pre>

<p>but I am not sure how to append both sublists of scanned to the 1st and 2nd sublists of localisation.</p>

<p>Any ideas?</p>
