Carl Banks <pavlovevide...@gmail.com> wrote: > The end parameter looks pretty useless for > .startswith() and is probably only present for consistency with other > string search methods like .index().
No, the end parameter could be useful if the slice ends up shorter than the prefix string: >>> 'abcd'.startswith('abc', 0, 2) False Likewise the start parameter for endswith. -- Duncan Booth http://kupuguy.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list