list(set) for nested lists?
<p>I am currently working on a module that will compute the angle between a vector and the normal of a plane.</p>

<p>Anyhow to satisfy the conditions of computing the normal to the plane, I need 3 points in R3.</p>

<p>I have found a way to do this by converting the list elements to strings, however this complicates the code downstream. The following block of code aims to satisfy this condition. List t2 contains the strings and works well downstream, however I wish to work with a nested list (t1).</p>

<pre><code>t1,t2=[],[] #B3
for i in range(0, len(s)):
    t1.append([s[i][0][0],s[i][2][4]])

    t2.append(s[i][0][0]+s[i][2][4])
u,j,k=list(set(t2)),[],[]
for item in u:
    j.append(t2.count(item))
if len(u) == len(j):
for i in range(0, len(u)):
    if j[i] &gt;= 3:
        k.append([u[i]])

#For additional clarity:
List t1 looks as follows:
[['[7,', '158,'],
 ['[7,', '158,'],
 ['[51,', '158,'],
 ['[51,', '158,'],
 ['[51,', '158,'],
 ['[51,', '161,'],
 ['[51,', '161,'],
 ['[51,', '161,'],
 ['[298,', '114,'],
 ['[808,', '138,'],
 ['[808,', '138,']...
</code></pre>

<p>So within t1 if there exists 3 or more lists containing equivalent elements (such as ['[51,', '158,']) I wish to append these. The problem is that the set() does not work with nested lists.</p>

<p>Is there a way around this?
Cheers</p>