A close look at the EOFError in Python, including a functional code sample showing how to handle user input in both Python 2 and Python 3. EOF stands for End Of File. As suggested by Wubao Li, you should use try/except when reading your input string, and if an EOF error has been risen you could set the check to an empty. I am unable to run any program in python 3 ide because of the EOF error on the first line itself while taking the input for the number of test cases. EOF error results usually in an online judge like CodeChef when an input is given by the system but the input reading line is not at the right place.