cse151b-final-project/eric_wordle/process.py

16 lines
372 B
Python
Raw Permalink Normal View History

2024-03-19 18:52:10 +00:00
import pandas
print('Loading in words dictionary; this may take a while...')
df = pandas.read_json('words_dictionary.json')
print('Done loading words dictionary.')
words = []
for word in df.axes[0].tolist():
if len(word) != 5:
continue
words.append(word)
words.sort()
with open('words.txt', 'w') as f:
for word in words:
f.write(word + '\n')