On 2015-04-24 09:00, Ian Kelly wrote: > It is not equivalent to: > > if ("AND" in str1) or ("OR" in str1) or ("NOT" in str1): Which python allows you to write nicely as if any(term in str1 for term in ["AND", "OR", "NOT"]): The use of any()/all() has certainly improved the readability of my code since they were added (in 2.5?). -tkc