Apex String Replace Function In Python