[Solved] Can someone tell me why this else statement is giving me a syntax error in Python [closed]


You are most likely mixing tabs with spaces now that you have edited the question the indention looks correct and it indeed works as intended with what you have posted.

So the only other thing is your actual file you are executing has mixed tabs and spaces so the indention is incorrect. A good IDE like PyCharm will show you this and warn you about it.

0

solved Can someone tell me why this else statement is giving me a syntax error in Python [closed]