如果if语句中的条件为false,那么将执行的套件前面的关键字是什么?
这个问题是我在Python中遇到困难的一个家庭作业。我试着翻遍各章以获取信息。
你的问题措辞很难理解,但我认为这个提示正是你想要弄清楚的:
if <some condition goes here>:
<statements to execute if the statement is true>
<something goes here>:
<statements to execute if the statement is false>
用什么词代替<something goes here>
?
您可以在这里找到Python的完整语法规范。以下是if
-语句的结构:
if_stmt:'if'test':'套件('lif'test','套件)*['else':'套房]