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

timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
Micro-optimization: replace s.find(x)==0 with s.startswith(x)

timeit shows a speedup of ~1.4x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
Merge pull request #6732 from ciupicri/micro-optimizations

Micro-optimizations