A curious bit of code...
neilc at norwich.edu
Thu Feb 13 20:51:25 CET 2014
On 2014-02-13, Peter Otten <__peter__ at web.de> wrote:
> forman.simon at gmail.com wrote:
> The first is too clever for my taste.
> The second is fast and easy to understand. It might attract
> "improvements" replacing the slice with an index, but I trust
> you will catch that with your unit tests ;)
It's easy to forget exactly why startswith and endswith even exist.
More information about the Python-list