How do I load all files in a directory in 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"))