partition() - Returns a tuple where the string is parted into three parts

Searches for the specified substring to match on and returns a tuple of three strings: everything before the match, the match string, everything after the match string.

Example

Python
str = 'The quick brown fox jumped over the lazy dog'
print(str.partition('fox'))

Output

('The quick brown ', 'fox', ' jumped over the lazy dog')