Function to test if any one of them matches with the given 2 - D array
def testGrid ( testGrid , Grid , N , M ) : NEW_LINE INDENT for i in range ( N ) : NEW_LINE INDENT for j in range ( M ) : NEW_LINE INDENT if ( Grid [ i ] [ j ] != ' * ' ) : NEW_LINE INDENT if ( Grid [ i ] [ j ] != testGrid [ i ] [ j ] ) : NEW_LINE INDENT return False NEW_LINE DEDENT DEDENT DEDENT DEDENT return True NEW_LINE DEDENT