由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - Best way to do this in python: if((str contains AA or BB) and (str contains CC))
相关主题
How to send a structure containing a pointer over socket?学python的一点小感觉哈
std::map 为什么没有排序呢阅读scala中
通过日志分析yarn app实际内存用量谁知道这个嵌套的Python if 是啥意思?
Go’s path to becoming a Top 10 if not Top 5 languagepython 有什么好书可以读一读?
感觉用python的人,属于程序员中的文艺青年那类的Python:请问如何把list变成structured array。
看C码工写Python真是捉急Anybody help me on these questions?
python要把@当作矩阵乘法算符BT实战
Java is backwhy use template?
相关话题的讨论汇总
话题: contains话题: str话题: aa
进入Programming版参与讨论
1 (共1页)
w*s
发帖数: 7227
1
if((str contains AA or BB) and (str contains CC))
what's the best way pls
d********g
发帖数: 10550
2
最简单就是直译:
if ('AA' in s or 'BB' in s) and 'CC' in s:

【在 w*s 的大作中提到】
: if((str contains AA or BB) and (str contains CC))
: what's the best way pls

w*s
发帖数: 7227
3
thanks a lot !

【在 d********g 的大作中提到】
: 最简单就是直译:
: if ('AA' in s or 'BB' in s) and 'CC' in s:

1 (共1页)
进入Programming版参与讨论
相关主题
why use template?感觉用python的人,属于程序员中的文艺青年那类的
求助:Wavelet 的 library (转载)看C码工写Python真是捉急
Question on C++ Access Control (protected)python要把@当作矩阵乘法算符
What language I should use?Java is back
How to send a structure containing a pointer over socket?学python的一点小感觉哈
std::map 为什么没有排序呢阅读scala中
通过日志分析yarn app实际内存用量谁知道这个嵌套的Python if 是啥意思?
Go’s path to becoming a Top 10 if not Top 5 languagepython 有什么好书可以读一读?
相关话题的讨论汇总
话题: contains话题: str话题: aa