Python3三位运算

代码:

a = 1
b = 2
result = "a>b" if a > b else "a<b"
print(result)

运行结果:

a<b

 

posted @ 2019-09-10 21:59  Jumpkin1122  阅读(196)  评论(0编辑  收藏  举报