The partition() method splits the string using a separator string. Returns a tuple with string splits and separator.
>>> 'Hello, world!'.partition('o')
('Hell', 'o', ', world!')
If the separator string can’t be found it will return the entire string with the second two strings as empty strings.