mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-26 05:02:31 -06:00
15 lines
430 B
Python
15 lines
430 B
Python
|
class SequenceList:
|
||
|
|
||
|
def __init__(self, wordlist):
|
||
|
self.list = {}
|
||
|
for line in wordlist:
|
||
|
if line is '':
|
||
|
continue
|
||
|
split = line.split(':')
|
||
|
self.list[split[0].lower()] = [word.rstrip('\r\n').lower() for word in split[1].split(',')]
|
||
|
|
||
|
def getList(self, word):
|
||
|
if word in self.list:
|
||
|
return self.list[word]
|
||
|
else:
|
||
|
return []
|