浏览代码

adding get words function.

master
Charles Reid 3 年前
父节点
当前提交
b16c360103
共有 1 个文件被更改,包括 19 次插入0 次删除
  1. +19
    -0
      get_words.py

+ 19
- 0
get_words.py 查看文件

@@ -0,0 +1,19 @@
"""
get_words.py

Utility method to load the SBG words
and retun them as a list of strings.
"""

def get_words():
# Load the file.
with open('sgb-words.txt','r') as f:
## This includes \n at the end of each line:
#words = f.readlines()
# This drops the \n at the end of each line:
words = f.read().splitlines()

return words



正在加载...
取消
保存