I was attempting to distinguish an empty input from others using the try catch statement. Currently, I have this.
while True:
try:
user = int(input("Please enter an integer"))
break
except ValueError:
print("Must be an integer")
The problem comes from the fact that I would like a separate error statement if the user does not enter anything and only presses the enter key. However, it still reads that particular input as a ValueError and gives the me the message above no matter what else I try.