Python Find And Replace First Occurrence Leetcode 752