def ask():
while True:
try:
num = int(input("Enter an integer:"))
except:
print('Not a number, please try again')
continue
else:
print('Thats a valid number!')
break
finally:
print('All done')
I get this error-I checked and rechecked indentaion, but still not working
File "<ipython-input-46-ff8c841c59c4>", line 8
else:
^
SyntaxError: invalid syntax