Richie Hindle <richie at entrian.com> wrote in message news:<mailman.1060011610.28906.python-list at python.org>... > > 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.