How can I iterate over files in a given directory in Python?
Answers
Answered by
0
import os
file_names = os.listdir('directory goes here')
for file in file_names:
# do something with all file Present in the provided directory
Similar questions
Social Sciences,
7 months ago
English,
7 months ago
Math,
7 months ago
Physics,
1 year ago
Math,
1 year ago