21 lines
439 B
Python
21 lines
439 B
Python
![]() |
#!/usr/bin/python3
|
||
|
|
||
|
def import_cf_words():
|
||
|
file = open('word_db.txt')
|
||
|
words = file.readlines()
|
||
|
word_db = {
|
||
|
'c': [],
|
||
|
'f': []
|
||
|
}
|
||
|
for w in words:
|
||
|
if(w[0] == 'c'):
|
||
|
word_db['c'].append(w.strip())
|
||
|
else:
|
||
|
word_db['f'].append(w.strip())
|
||
|
return word_db
|
||
|
|
||
|
if(__name__ == '__main__'):
|
||
|
word_db = import_cf_words()
|
||
|
print(word_db['c'])
|
||
|
print(word_db['f'])
|