def in_box(coords, box):
 if ((box[0][0] < coords[0] < box[1][0]) and (box[1][1] < coords[1] < box[0][1])):
  return True
 return False

def in_box ( coords , box ) : if ( ( box [ 0 ] [ 0 ] < coords [ 0 ] < box [ 1 ] [ 0 ] ) and ( box [ 1 ] [ 1 ] < coords [ 1 ] < box [ 0 ] [ 1 ] ) ) : return True return False
find if a coordinate tuple is inside a bounding box .