📜  python代码示例中的三元运算符是什么

📅  最后修改于: 2022-03-11 14:46:57.927000             🧑  作者: Mango

代码示例2
condition = True
print("This condition is true!") if condition else print("This condition is false!")
# The if statement in one line! (Ternary operator)