[英]How to check two mule running status in python
谁能帮我将下面的 python 代码修改为单个返回语句?
return any("is running" in x for x in response.splitlines()) <br>
return any("active (running)" in x for x in response.splitlines())
我尽力而为,但最终得到“ SyntaxError: Generator expression must be parenthesized if not sole argument
。
提前致谢!
return any("is running" or "active (running)" in x for x in response.splitlines())
这个工作正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.