odnajdywanie slow kluczowych
This commit is contained in:
parent
c2ed3ce906
commit
75d7f08b20
27
projektkck.py
Normal file
27
projektkck.py
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user