源码

首页 » 归档 » 源码 » 在Python字符串中使用“and”和“or”运算符

在Python字符串中使用“and”和“or”运算符


参见英文答案 > Strange use of “and” / “or” operator????????????????????????????????????8个
我不明白这条线的含义:

parameter and (" " + parameter) or ""

其中parameter是string

为什么人们想要使用和和或运算符一般使用python字符串?

(0)

本文由 投稿者 创作,文章地址:https://blog.isoyu.com/archives/zaipythonzifuchuanzhongshiyongandheoryunsuanfu.html
采用知识共享署名4.0 国际许可协议进行许可。除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。最后编辑时间为:9 月 19, 2019 at 09:27 下午

热评文章