How to Replace the Second Occurrence of a Character in a String Using Python with Example