Replacing Characters In A String Python Functions