Which is faster? (if not b in m) or (if m.count(b) > 0)

bruno at modulix onurb at xiludom.gro
Wed Feb 15 06:43:22 EST 2006


Farel wrote:
> Which is Faster in Python and Why?

Why don't you try by yourself ?
hint :
from timeit import Timer
help(Timer)


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list