Skip to content

Instantly share code, notes, and snippets.

def reindex():
dictionary = open('US.dic', 'r')
linecount = 0
length = 0
length_breaks = []
for line in dictionary:
word_len = len(line)
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]: