I am trying to get my function to loop back and ask a question again if the user inputs no when asked. Instead of going to my elif statement, it defaults to the first if statement no matter what I put.
def full_name(): # catagorize if user wants to input full name
try:
while True:
f, n = input("What is the full name? ").split()
user_confirm = input(f.upper() + " " + n.upper() + ". " + "That's correct? ")
if user_confirm.lower() == str("yes") or str("y"):
print("User confirm")
break
elif user_confirm.lower() == str("no") or str("n"):
print("User deny")
continue
except Exception: print("full name error")
#pass
pass