I have list from os.walk. But I want to exclude some directories and files. I know how to do it with directories:
for root, dirs, files in os.wa
The easiest way to filter files with a known type with os.walk() is to tell the path and get all the files filtered by the extension with an if statement.
for base, dirs, files in os.walk(path):
if files.endswith('.type'):
#Here you will go through all the files with the particular extension '.type'
.....
.....