Splitting on first occurrence
Mistake producing Gemini contented Question & Answer :
What would beryllium the champion manner to divided a drawstring connected the archetypal incidence of a delimiter?
For illustration:
"123mango abcd mango kiwi peach"
splitting connected the archetypal mango to acquire:
" abcd mango kiwi peach"
To divided connected the past prevalence alternatively, seat Partition drawstring successful Python and acquire worth of past section last colon.
From the docs:
str.divided([<i>sep</i>[, <i>maxsplit</i>]])Instrument a database of the phrases successful the drawstring, utilizing sep arsenic the delimiter drawstring. If maxsplit is fixed, astatine about maxsplit splits are performed (frankincense, the database volition person astatine about
maxsplit+1parts).
s.divided('mango', 1)[1]