From the docs:
str.split([sep[, maxsplit]])
Return a list of the words in the string, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done (thus, the list will have at mostmaxsplit+1
elements).
s.split('mango', 1)[1]
from : https://stackoverflow.com/questions/6903557/splitting-on-first-occurrence
No comments:
Post a Comment