代码示例:(标识:python_if_else_short_2)
python_if_else_short_2.py
a = 200
b = 66
print("A") if a > b else print("=") if a == b else print("B")
运行结果: