I have a folder called notes, naturally they will be categorized into folders, and within those folders there will also be sub-folders for sub categories. Now my problem is
You could do this:
list_of_files = dict([ (file, os.sep.join((dir, file))) for (dir,dirs,files) in os.walk(path) for file in files if file[-5:] == '.html' ])