Is there a way to use raw input inside an if-statement? I would like to ask the user a question and if they type "yes" I want to code to continue working after the if-statement. If they type "no" I want the code to say "Thank you for your time" and then stop all actions after that particular if-statement. Is this possible?
Code (I have never done this before so this is a wild guess):
tri=raw_input("Do the points that you entered form a triangle? (yes or no)")
tri=str(tri)
if tri == "yes" or "Yes" or "YES":
print "Your triangle is an:"
elif tri == "no" or "NO" or "No":
print "Thank you for your time."
else:
print "Not a valid answer, please try again later."