Apex String Replace Function Python