I have list from os.walk. But I want to exclude some directories and files. I know how to do it with directories:
os.walk
for root, dirs, files in os.wa
Exclude multiple extensions.
files = [ file for file in files if not file.endswith( ('.dat','.tar') ) ]