[issue13755] str.endswith and str.startswith do not take lists of strings

Mark Dickinson report at bugs.python.org
Tue Jan 10 12:21:43 CET 2012


Mark Dickinson <dickinsm at gmail.com> added the comment:

No, but they take tuples:

>>> 'abcd'.endswith(('a', 'b'))
False
>>> 'abcd'.endswith(('c', 'd'))
True

Suggest closing as out of date.

----------
nosy: +mark.dickinson
type: behavior -> enhancement
versions: +Python 3.3 -Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13755>
_______________________________________


More information about the Python-bugs-list mailing list