code: def right_replace(string, old, new, count=1):
      
      if not string:
          return string
      return new.join(string.rsplit(old, count))
docs: Right replaces ``count`` occurrences of ``old`` with ``new`` in ``string``.
      For example::
  
          right_replace('one_two_two', 'two', 'three') -> 'one_two_three'