else & elif statements not working in Python

后端 未结 9 995
礼貌的吻别
礼貌的吻别 2020-12-10 11:06

I\'m a newbie to Python and currently learning Control Flow commands like if, else, etc.

The if statement is working all fine

9条回答
  •  北海茫月
    2020-12-10 11:35

    The problem is the blank line you are typing before the else or elif. Pay attention to the prompt you're given. If it is >>>, then Python is expecting the start of a new statement. If it is ..., then it's expecting you to continue a previous statement.

提交回复
热议问题