rsplit() returns a list after breaking a string using delimiter and max value
my_str.rsplit(delimiter,max_value)
delimiter : to be used to break the string max_value : optional , the number of elements in output plus one. Default value is -1 so it includes all occurance.
We can use optional value max_value to specify number of splits. After reaching this max_value rest of the string is returned as it is without any further break.
See the difference in output below.
my_str='Welcome to plus2net'
print(my_str.rsplit('e')) # without any max_value
print(my_str.rsplit('e',2))
print(my_str.split('e',2))
Output
['W', 'lcom', ' to plus2n', 't']
['Welcom', ' to plus2n', 't']
['W', 'lcom', ' to plus2net']