This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def reindex(): | |
| dictionary = open('US.dic', 'r') | |
| linecount = 0 | |
| length = 0 | |
| length_breaks = [] | |
| for line in dictionary: | |
| word_len = len(line) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def recursive_word_is_valid(word, board, pos): | |
| """ | |
| Arguments: | |
| - `word`: the remainder of the word to be searched. | |
| - `board`: the current board. | |
| - `pos`: the current position in the board. | |
| """ | |
| if board[pos[0]][pos[1]] == word[0]: |
NewerOlder