title: How to iterate over files and replace text
body: <p>I'm python beginner: how can I iterate over csv files in one directory and replace strings e.g. </p>
  
  <pre><code>ww into vv
  .. into --
  </code></pre>
  
  <p>So, I do not want to replace lines having ww into vv, just those string on this line. I tried something  like</p>
  
  <pre><code>#!/Python26/
  # -*- coding: utf-8 -*-
  
  import os, sys
  for f in os.listdir(path):
      lines = f.readlines() 
  </code></pre>
  
  <p>But how to proceed?</p>