Match beginning of two strings

John Machin sjmachin at
Tue Aug 5 01:07:57 CEST 2003

Richie Hindle <richie at> wrote in message news:<mailman.1060011610.28906.python-list at>...
> for C strings.  There's another similar optimisation that the C
> output leads you to: you can use strlen rather than Python's len:

You can, if you don't care about the possibility that the input may contain NULs.

More information about the Python-list mailing list