Figure out all the 5 letter words (part 2)

Published April 27, 2022, 2:10 p.m.

from nltk.corpus import words
import string

UPPERCASE = list(string.ascii_uppercase)

word_list = words.words()

op = set()

for i, word in enumerate(word_list):
    if len(word) == 5 and word[0] not in UPPERCASE:
        lenop1 = len(op)
        op.add(word)
        lenop2 = len(op)
        if lenop1 != lenop2:
            print(word)
            flw_file = open("five_letter_words_list.txt", 'a')
            flw_file.write(word+", ")
            if lenop2%10 == 0:
                flw_file.write('\n')
            flw_file.close()
skip_nextColor letters with colorama!
  • Introduction to PyWordle

  • Get the latest version of Python (3.10.4)

  • Figure out all the 5 letter words (part 1)

  • Figure out all the 5 letter words (part 2)
    (currently viewing)
  • Color letters with colorama!

  • Get words from our word list!

  • Select a Random Wordle

  • Use a 'WHILE' loop for guessing

  • Start Comparing Letters in Words

  • Plan out the Wordle Logic

  • Put Wordle Logic Plan into Action!

  • Declaring Victory