I checked this out some time ago, but not very comprehensively. This
time, I've compared the speed of:
regular expressions
in line
line.find() == x
line.startswith( ,x)
line[x:y]
and line[x:y] is at least twice as fast as the other contenders. The
order (from memory) is roughly that listed above.
Regards,
Noel
|