Skip to content

Instantly share code, notes, and snippets.

@zags
zags / wordle_solver.py
Last active February 26, 2022 22:22
Program that reliably beats Wordle on hard mode
from itertools import zip_longest
from collections import Counter
with open("z-wordle-answers-alphabetical.txt") as f:
ANSWER_WORDS = [word.strip() for word in f.read().split(",")]
with open("z-wordle-allowed-guesses.txt") as f:
GUESS_WORDS = [word.strip() for word in f.read().split(",")] + ANSWER_WORDS
MISS = 0
CLOSE = 1