On Mar 21, 3:57 pm, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] writes: > > if 'one' and 'two' in f: > > alist.append(f) > > Use: > if 'one' in f and 'two' in f: ...
Personally, I would put parentheses around to be clearer:
if ('one' in f) and ('two' in f): ...
I'm not saying to put parentheses around everything, but in the more
ambiguous cases, it certainly helps.
--
http://mail.python.org/mailman/listinfo/python-list
