I am writing a function which is supposed to get the user's response, yet when I run the file nothing happens, its just an empty screen, how do I fix that? I tried searching up in stackoverflow but I couldnt find what im looking for, thanks in advance :)
def get_user_response():
while True:
try:
print ('Enter the number of clickbait headlines to generate: (0 to exit)')
user = int(input('> '))
print ('HEADLINES')
if user == 0:
for x in range (0,4):
l = "Exiting Program" + "." * x
print (l, end="\r")
sleep(1)
break
else:
print ('a')
except:
print ('Invalid - Enter an integer')