If y coordinate matches with other same line
if ( p [ j ] [ 1 ] == y1 ) : NEW_LINE INDENT c3 += 1 NEW_LINE DEDENT if ( p [ j ] [ 1 ] == y2 ) : NEW_LINE INDENT c4 += 1 NEW_LINE DEDENT else : NEW_LINE ok = 0 NEW_LINE