Replace A Part Of String In Python Function