If I have a string, lets just say, b a hello b Hi, how could I split the string by all bs AFTER the first occurrence of the letter a?
As in, it would return ["b a hello", "Hi"].
This is documented here: str.rsplit()
sentence = 'b a hello b Hi'
sentence.rsplit('b', 1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With