So I've been working on this code and got stuck and was wondering if you guys could help me out.
# 31/05/17 (dd/mm/yy)
# encryption and decryption
#--------------------------------------------
print("Hello, in this program you will be able to encrypt your own message,
and decrypt others")
#--------------------------------------------
ans = int(input("""
What would you like to do:
1. Encrypt your own message
2. Decrypt a message
Type the number corresponding to the action that you want to preform, then
press ENTER
"""))
#--------------------------------------------
if ans == 1:
print("hi")
#--------------------------------------------
else ans == 2:
code = input("""
:""")
#--------------------------------------------
break
#--------------------------------------------
How would I make it where if they don't enter a 1 or a 2, so it will just re-ask them?