sick_file_update_must_see.mp4
This commit is contained in:
parent
aa695f993d
commit
9c7fbaa54b
@ -5,24 +5,20 @@ instructionsfile = open('instructions.txt', 'r')
|
|||||||
|
|
||||||
def commandStrip(sentence):
|
def commandStrip(sentence):
|
||||||
for line in dotsfile:
|
for line in dotsfile:
|
||||||
line=line.strip('\n').replace(line, "")
|
line = line.strip('\n').replace(line, "")
|
||||||
return sentence
|
return sentence
|
||||||
|
|
||||||
def searchKeyWords(sentence):
|
def searchKeyWords(sentence):
|
||||||
found = []
|
found = []
|
||||||
for line in wantedfile:
|
for line in wantedfile:
|
||||||
line=line.strip('\n')
|
if sentence.find(line.strip('\n')) >= 0:
|
||||||
if sentence.find(line) >= 0:
|
found.append(line.strip('\n'))
|
||||||
found.append(line)
|
|
||||||
|
|
||||||
if found:
|
|
||||||
return found
|
return found
|
||||||
return 1
|
|
||||||
|
|
||||||
def saveKeyWords(array):
|
def saveKeyWords(array):
|
||||||
for line in array:
|
for line in array:
|
||||||
keywordsfile.write(line)
|
if line != '':
|
||||||
keywordsfile.write("\n")
|
keywordsfile.write(line + '\n')
|
||||||
|
|
||||||
saveKeyWords(searchKeyWords(commandStrip(instructionsfile.read())))
|
saveKeyWords(searchKeyWords(commandStrip(instructionsfile.read())))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user