Upload files to ''

This commit is contained in:
Maciej Wrzesiński 2016-11-03 08:14:02 +00:00
parent d74b601c3c
commit d65ae698c9

View File

@ -1,13 +1,13 @@
dotsfile = open('dots.txt', 'r+')
wantedfile = open('wanted.txt', 'r+')
dotsfile = open('dots.txt', 'r')
wantedfile = open('wanted.txt', 'r')
def commandToArray(sentence):
print(sentence)
def commandStrip(sentence):
for line in dotsfile:
line=line.strip('\n')
sentence = sentence.replace(line, "")
print(sentence)
return sentence
def searchKeyWords(sentence):
found = []
for line in wantedfile:
line=line.strip('\n')
@ -18,10 +18,10 @@ def commandToArray(sentence):
return found
return 1
def arrayToShit(array):
print("I have found words: " + " ".join(array))
return 0
temp = commandStrip("Guten tag, ich want you to pick up big red triangle.")
temp = searchKeyWords(temp)
if temp!=1:
print("I have found words: " + " ".join(temp))
array = commandToArray("HEHEHEHHEHEHEHEHELLO, I want you to give me an eye!?!!")
if array!=1:
arrayToShit(array)
dotsfile.close()
wantedfile.close()