Experiments with Knuth's 5,757 five letter words. https://charlesreid1.com/wiki/Five_Letter_Words
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
376B

  1. """
  2. get_words.py
  3. Utility method to load the SBG words
  4. and retun them as a list of strings.
  5. """
  6. def get_words():
  7. # Load the file.
  8. with open('sgb-words.txt','r') as f:
  9. ## This includes \n at the end of each line:
  10. #words = f.readlines()
  11. # This drops the \n at the end of each line:
  12. words = f.read().splitlines()
  13. return words