Answers for "pyhton traverse through directories and files inside them"

10

python loop through files in directory

import os

for filename in os.listdir(directory):
    if filename.endswith(".asm") or filename.endswith(".py"): 
         # print(os.path.join(directory, filename))
        continue
    else:
        continue
Posted by: Guest on May-11-2020

Code answers related to "pyhton traverse through directories and files inside them"

Python Answers by Framework

Browse Popular Code Answers by Language