For example I have followed string:
names = "JohnDoeEmmyGooseRichardNickson"
How can I split that string based on the title of the words? So every time a capital letter occurs, the string will be split up.
Is there a way to do this with the split()
method? (no regex)
That I will get:
namesL = ["John","Doe","Emmy","Goose","Richard","Nickson"]