The partition()
method in Python cuts a string into three parts with a delimiter.
`string.partition(delimiter)`
This method will only search the first occurrence of the delimiter.
This method will return a tuple with three values: the string before the delimiter, the delimiter itself, and the string after it.
If it doesn’t find the delimiter, it will return a tuple with only the string as the first element.
print("educative is awesome!".partition("is "))print("educative is awesome!".partition("hello"))