https://bytenota.com/python-replace-last-occurrence-of-a-string/
Anonymous
Choose portability over efficiency.