Python 中的三目运算

<true statement> if <condition expression> else <false statement>

首先对条件表达式<condition expression>求值,如果值为True,则执行<true statement>,否则执行<false statement>。

发布了83 篇原创文章 · 获赞 14 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/weixin_38121168/article/details/103286979
今日推荐