if-elif-else 分支语句 ; 语句
And then it has a strange thing called ELIF, which is simply short for else/if in a second test.
然后代码做了一个奇怪的,叫做ELIF的事情,也就是else/if的简写,这是第二个测试。
If none of the conditions are true, it will execute the "else" action, if one is present, and then continue executing lines following the entire "if, elif, else" statement.
如果没有条件为真,则将执行“ else ”操作,如果有一个条件为真,则继续执行整个“ if, elif, else ”语句之后的行。
The result is an else if statement, which is shortened to elif, as demonstrated in Listing 6.
结果是一个else if语句,简写为elif,如清单6所示。
And then it has a strange thing called ELIF, which is simply short for else/if in a second test.
然后代码做了一个奇怪的,叫做ELIF的事情,也就是else/if的简写,这是第二个测试。
应用推荐