I'd like to be able to use raw_input put in by the user in an if statement, but I have no idea how to do it. Here, I ask them for raw input and if they type, "yes", I want to print, "Your triangle is:". if they type, "no", I want to print "Thank you for your time." Is there a way to do this? Please see my code below:
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."
Also, if the user types "no", I want to end all code after that. Is there some way of putting that into the elif part of the if statement? (Note: I will write a function after this if statement, but I only want the function to work if the user types "yes".)
This is different from other questions on this site because I'm asking for raw_input.