diff --git a/projektkck.py b/projektkck.py new file mode 100644 index 0000000..288ade2 --- /dev/null +++ b/projektkck.py @@ -0,0 +1,27 @@ +dotsfile = open('dots.txt', 'r+') +wantedfile = open('wanted.txt', 'r+') + +def commandToArray(sentence): + print(sentence) + for line in dotsfile: + line=line.strip('\n') + sentence = sentence.replace(line, "") + print(sentence) + + found = [] + for line in wantedfile: + line=line.strip('\n') + if sentence.find(line) >= 0: + found.append(line) + + if found: + return found + return 1 + +def arrayToShit(array): + print("I have found words: " + " ".join(array)) + return 0 + +array = commandToArray("HEHEHEHHEHEHEHEHELLO, I want you to give me an eye!?!!") +if array!=1: + arrayToShit(array)