I have a python program that uses a while loop to check for a user input. I want it to keep running while a user enters an input, but quit when the user enters ctrl d. Currently, I get EOFError when typing ctrl d. I am new to python so any advice on how to fix this would be really helpful.
Here is a very simple example of my code:
while True:
userInput = input()
...
exit()