Write a python program to split a string on the last occurrence of the delimiter.
Program:-
str1 = "s,i,r,f,p,a,d,h,a,i"
print(str1.rsplit(',' , 1)
print(str1.rsplit(',' , 2)
print(str1.rsplit(',' , 5)
Output:-
's,i,r,f,p,a,d,h,a','i'
's,i,r,f,p,a,d,h', 'a','i'
's,i,r,f,p', 'a', 'd', 'h', 'a','i'