a=[[(1,2),(7,-5),(7,4)],[(5,6),(7,2)],[(8,2),(20,7),(1,4)]]
A nested list of coordinates are as given in a.
For example (1,2) refers to x,y coordinates.
Imposing condition that x,y> 0 & <10 and deleting those points.
for x in a:
for y in x:
for point in y:
if point<=0 or point>=10:
a.remove(x)
Expected result a=[[(5,6),(7,2)]]
This is the error I get:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()