python条件运算符
如果条件运算符 (if else conditional operator)
Just like other programming languages, Python also provides the feature to evaluate conditional statements using the conditional operator.
与其他编程语言一样,Python也提供了使用条件运算符评估条件语句的功能。
In this tutorial, we will see the if else conational operator.
在本教程中,我们将看到if else conational运算符。
if else conditional operator is used to evaluate/get either value/statement (from the given two values/statements) depending on the result of the given Boolean expression.
如果不是,则根据给定布尔表达式的结果,使用条件运算符评估/获取值/声明(从给定的两个值/声明)。
Syntax:
句法: