I have a directory logfiles. I want to process each file inside this directory using a Python script.
for file in directory: # do something
How do I do this?
With os.listdir() or os.walk(), depending on whether you want to do it recursively.
os.listdir()
os.walk()
1.4m articles
1.4m replys
5 comments
57.0k users