How To Replace A Substring In Python