EOF when reading a line:-
![](https://pythonpoint.net/wp-content/uploads/2020/12/Orange-Greyscale-Photo-Gaming-YouTube-Channel-Art-5-1024x576.jpg)
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.
e.g.,
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.
Subscribe
Login
Please login to comment
0 Discussion