def try_except_fun():
while True:
try:
res = int(input('Input a number:'))
except:
print('Not an integer')
continue
else:
print('if exception doesnt happen')
break