0
Hey, what's eof error in Python ?
When I run the code a message appears and it says Eof error https://code.sololearn.com/cC9eA1hSa2RS/?ref=app
6 Antworten
+ 1
You assign a 'str' value to "num".
input() method always return a 'str' as output, so you can't comparison a 'str' with an 'int'.
a = input()
# a is a string
b = int(input())
# b is an integer
**************************
"20" < 50
ERROR!
20 < 50
True
**************************
I hope this will be helpful.
+ 1
EOFError refers to unfinished parentheses or invalid indenting.
0
When you use file.read () there's no problem. But suppose you are reading the file in chunks. Then if the file would reach it's end before reading desired number of bytes then eof error will be thrown.
0
Qasem thank you
0
Try to give all of your inputs at the beginning and in space separated form to avoid getting that error.