Replace A Pattern With Different Pattern In Python