title: How can I ignore a specific file while walking through the tree?
body: <p>I want to ignore a specific file while using <code>os.walk(path)</code> to iterlate the subTree in the directory.</p>
  
  <p>But for some reason, there is some file I am not expect to parse. e.g. the <code>.git</code> file which includes lots of documents. How can I do this?</p>
  
  <pre><code> file_to_ignore = '.git'
   for dirname, dirnames, filenames in os.walk(path):
       for filename in filenames:
           if filename == file_to_ignore: continue
           else: 
                #do somthing
  </code></pre>