0
how to fix EOF error in python?
how do i fix an EOF error in python? https://code.sololearn.com/cO98UB8vkZW0
4 Respostas
+ 1
EOF errors often occur when your program expects an input (wants to read an input) but does not find one.
On sololearn you have to enter all input at the beginning.
And you are using while True without any break statements.
Means, you would need to enter infinity times: rock, paper or scissor to avoid eof error.
So I suggest you just let the program end when the user or the bot wins the game.
+ 5
Hello Decode
Please show us your code so that we can help you.
0
text = input()
word = input()
def search(text, word):
text = str.split(' ')
for words in text:
if word == words:
print("Word found")
else:
print("Word not found")
print(search(text, word))