title: Browse files and subfolders in Python
body: <p>I'd like to browse through the current folder and all its subfolders and get all the files with .htm|.html extensions. I have found out that it is possible to find out whether an object is a dir or file like this:</p>
  
  <pre><code>import os
  
  dirList = os.listdir("./") # current directory
  for dir in dirList:
    if os.path.isdir(dir) == True:
      # I don't know how to get into this dir and do the same thing here
    else:
      # I got file and i can regexp if it is .htm|html
  </code></pre>
  
  <p>and in the end, I would like to have all the files and their paths in an array. Is something like that possible?</p>