可能重复:
基本上,我使用for循环循环一个文件;然后我必须检查它是否包含我在列表中设置的3个字符串中的一个。到目前为止,我已经找到了多重if条件检查,但它并不觉得是真正优雅和有效的: if "string1" in line or "string2" in lineor "string3" in line:
print "foun
有一个业务逻辑需要检查IF子句中的多个条件,比如 Run Keyword If <condition1>, <condition2>,...ELSE do something 我试过了,但不起作用 单一条件->工作 Run Keyword If 'a' == 'a' log a
...ELSE Log b 多条件->不起作用 Run Keyword IF