I want to do a string replace in Python, but only do the first instance going from right to left. In an ideal world I\'d have:
myStr = \"mississippi\" print
It's kind of a dirty hack, but you could reverse the string and replace with also reversed strings.
"mississippi".reverse().replace('iss'.reverse(), 'XXX'.reverse(),1).reverse()