title: Python: How can I replace full-width characters with half-width characters?
body: <p>If this was PHP, I would probably do something like this:</p>
  
  <pre><code>function no_more_half_widths($string){
    $foo = array('１','２','３','４','５','６','７','８','９','１０')
    $bar = array('1','2','3','4','5','6','7','8','9','10')
    return str_replace($foo, $bar, $string)
  }
  </code></pre>
  
  <p>I have tried the .translate function in python and it indicates that the arrays are not of the same size.  I assume this is due to the fact that the individual characters are encoded in utf-8.  Any suggestions? </p>