I cannot understand for me why this if statement does not work in Python 3. I have always worked with python 2.7, but I need to get to know 3. Here is my code
print("Answer the question! [(Y)es or (N)o]: ") answer = input() print(answer) if answer == "y": print("OK") print("done")
I am starting this code, getting the question presented, normal, which is normal. For input, I give it one lowercase case y. I see that "y" is printed back to me, but then the program bypasses the if statement and goes straight to the point. What simple thing am I doing wrong?
source share