#NEWLINE# def find_elem_matrix_bool( m1 , value ) : #NEWLINE# #INDENT# found = False #NEWLINE# row = 0 #NEWLINE# col = ( len ( m1 [ 0 ] ) - 1 ) #NEWLINE# while ( ( row < len ( m1 ) ) and ( col >= 0 ) ) : #NEWLINE# #INDENT# if ( m1 [ row ] [ col ] == value ) : #NEWLINE# #INDENT# found = True #NEWLINE# break #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( m1 [ row ] [ col ] > value ) : #NEWLINE# #INDENT# col -= 1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# row += 1 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return found