The syntax of rpartition() is:
The rpartition() method takes a string parameter separator that separates the string at the last occurrence of it.
The rpartition method returns a 3-tuple containing:
string = "Python is fun"
# 'is' separator is found
# 'not' separator is not found
string = "Python is fun, isn't it"
# splits at last occurence of 'is'
When you run the program, the output will be:
('Python ', 'is ', 'fun')
('', '', 'Python is fun')
('Python is fun, ', 'is', "n't it")