mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Added docstring for rsplit.
This commit is contained in:
parent
ff6fdf02f3
commit
ff2e043f00
@ -122,6 +122,7 @@ def all(p, seq):
|
||||
return True
|
||||
|
||||
def rsplit(s, sep=None, maxsplit=-1):
|
||||
"""Equivalent to str.split, except splitting from the right."""
|
||||
if sep is not None:
|
||||
sep = sep[::-1]
|
||||
L = s[::-1].split(sep, maxsplit)
|
||||
|
Loading…
Reference in New Issue
Block a user