find all files in a direcotry python code example
Example 1: python dir all files
import os
for root, dirs, files in os.walk("."):
for filename in files:
print(filename)
Example 2: read all files in folder python
import glob
print(glob.glob("/home/adam/*.txt"))