Source Code:
(back to article)
import os path = '/path/to/directory' for file in os.scandir(path): if file.is_file(): print(file.name)
Result:
Report an issue