I have this data:
1, 0., 0., 1500.
.
.
21, 0., 2000., 1500.
22, 0., 2100., 1500.
which I already appended to a list called nodes: nodes[node ID, coord. x, coord. y, coord. z].
Now I want to find the coincident nodes. So I’ve tried:
for data in nodes:
for data2 in nodes:
if data2[1]==data[1] and data2[2]==data[2] and data2[3]==data[3] and data[0]<>data2[0]:
coincident_nodes.append((data[0],data2[0]))
what happens is that I get for instance: (31, 32) and (32, 31) and I only want (31, 32) or (32, 31), just one combination.
Many thanks.
Something like this will be much faster when there are more than a few nodes