a = 2 if False else 8
# 等价于
if False:
a = 2
else:
a = 5
灵活的if-else
猜你喜欢
转载自blog.csdn.net/qq_42467563/article/details/82949728
今日推荐
周排行