Replace Function In String In Python