title: Python Error io.UnsupportedOperation: not readable
body: <p>i have this error and i don't know why i got it.
  I followed the steps from my Python manual and i got this. I am tryng to cleanup the file on column 8 and 9 if they have that odd character.
  If someone could help me, please advise.</p>
  
  <p>The error appear on the line of code: <code>for row in csv.reader(f):</code></p>
  
  <p>Please find below my code:</p>
  
  <pre><code>    import csv
  
  
  file = '/Users/cohen/Desktop/sdn-2.csv'
  newstring = "null"
  newinteger = int(0)
  with open(file, 'r+') as f:
      for row in csv.reader(f):
         if row[7] =="-0-":
             row[7] = newinteger
         if row[8] == "-0-":
             row[8] = newinteger
  f.close()
  </code></pre>
  
  <p>***LATER EDIT I changed the code as above, but is not doing anything is not replacing the <code>-0-</code> with <code>0</code></p>