[issue42313] rstrip removes the trailing `e`s.
Batuhan Taskaya
report at bugs.python.org
Tue Nov 10 12:16:30 EST 2020
Batuhan Taskaya <isidentical at gmail.com> added the comment:
For 3.9+, you could do exactly what you want with .removesuffix (/.removeprefix) methods;
>>> test = "external_eeeeeeeee_object"
>>> test.removesuffix("_object")
'external_eeeeeeeee'
----------
nosy: +BTaskaya
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42313>
_______________________________________
More information about the Python-bugs-list
mailing list