In <[EMAIL PROTECTED]>, Farel wrote: > Which is Faster in Python and Why?
``if not b in m`` looks at each element of `m` until it finds `b` in it
and stops then. Assuming `b` is in `m`, otherwise all elements of `m` are
"touched".
``if m.count(b) > 0`` will always goes through all elements of `m` in the
`count()` method.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list
