Php Replace Character From Array Python