I have a list containing lists in two dimensions, so for example records[a][b] would be one value in it. There are some criteria that should filter it. I used a combination of "for" and "if" to do so and it worked. Then some additional criteria had to be added that filter out points that have coordinate value, which are in a range of 10*10 units around the currently iterated-over point. However my code compiles but does not do anything and I can't figure out why (as I am still new to Python).
for rec in range(1,len(records)-1):
for koor in range(1,len(records)-1):
if records[rec][4]+10 >= records[koor][4] >= records[rec][4]-10 and\
records[rec][5]+10 >= records[koor][5] >= records[rec][5]-10 and\
-1.00036 <= records[rec][8] / records[koor][8] <= 1.00036:
What I thought it would do is look for points in the defined area (line 3 & 4) and only let them pass under the condition of line 5. But it lets everything pass. Why is that not working?
Edit: One entry in the form of records[a] looks like this: ['30.12.1899 08:47:00', '7.2.2003 00:00:00', 48.82, 11.2, 4441489.89, 5410519.48, 4, 1.2, 508.55, 0.0, 0.0, 2].