title: Python replace - is there a trick to it? replacing '[%2C}'
body: <p>I have a series of text in a csv file:</p>
  
  <pre><code>7858.35924983374[%2C]1703.69341358077[%2C]-3.075},7822.85045874375[%2C]1730.80294308742[%2C]-3.53962362760298}
  </code></pre>
  
  <p>Is there a trick to getting replace to replace the [%2C] ?</p>
  
  <pre><code>with open('C:\IM\C3D\CommonLibraries\unewuoxhwt5k.wi2.conduit', "rb") as fin, open('C:\IM\C3D\CommonLibraries\unewuoxhwt5k.wi2.conduit', "wb") as fout:
      reader = csv.reader(fin)
      writer = csv.writer(fout)
      for row in reader:
      new_row = []
      for item in row:
          new_row.append(item.replace('[%2C]', ','))
      print row, "-&gt;", new_row
      writer.writerow(new_row)
  </code></pre>
  
  <p>Now I get a file, but it is empty, and I get this errorr message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;pyshell#6&gt;", line 6, in &lt;module&gt;
      for item in row:
  NameError: name 'row' is not defined
  </code></pre>