結果 : loop through string and replace characters python