Driver Code
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT board = [ [ ' A ' , ' B ' , ' C ' , ' E ' ] , [ ' S ' , ' F ' , ' C ' , ' S ' ] , [ ' A ' , ' D ' , ' E ' , ' E ' ] ] NEW_LINE word = " CFDASABCESEE " NEW_LINE f = 0 NEW_LINE for i in range ( len ( board ) ) : NEW_LINE INDENT for j in range ( len ( board [ 0 ] ) ) : NEW_LINE INDENT if ( board [ i ] [ j ] == word [ 0 ] and checkWord ( board , word , 0 , i , j ) ) : NEW_LINE INDENT print ( " True " ) NEW_LINE f = 1 NEW_LINE break NEW_LINE DEDENT DEDENT if f == 1 : NEW_LINE break NEW_LINE DEDENT if f == 0 : NEW_LINE print ( " False " ) NEW_LINE DEDENT