Logic operators with "in" statement
R.Brodie at rl.ac.uk
Mon Nov 16 15:17:20 CET 2009
"Mr.SpOOn" <mr.spoon21 at gmail.com> wrote in message
news:mailman.492.1258380560.2873.python-list at python.org...
> In : ('b3' and '5') in l or ('3' and 'b3') in l
> Out: True
For anything more than the simplest cases, you might want use sets.
That might be the correct data type from the start, depending on
whether the ordering is important anywhere.
More information about the Python-list