Jul-21-2017, 11:41 AM
Quote:works for me
I'm sorry, I mistyped my example. I meant to search on something not in the string; in the corrected example Ed.
The first works but the second doesn't. However, I was confused as "if ('Bob' or 'Ed') in s:" works. Regardless, the link provided as a response helps.
s='Bob' 'Tom' if 'Ed' in s or 'Bob' in s: if ('Ed' or 'Bob') in s: