EOF when reading a line:-
EOF is an end of file condition. We get this error when we use built-in function input and do not give any data to read.
This error is raised in some online IDEs.
We can overcome it by using try and except keywords.
a= int(input()) print(a* 5)
try: a= int(input()) print(a* 5) except EOFError as e: print(e)
In this way we can ignore this error in python.
Please login to comment
View all comments