Micro-optimization: replace str.find()!=-1 with in

timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
Besides it makes the code a bit shorter.