all files in current directory command python code example
Example 1: list files in directory python
import os
print(os.listdir('/path/to/folder/to/list'))
Example 2: list files python
import glob
files=glob.glob(given_path)
import os
print(os.listdir('/path/to/folder/to/list'))
import glob
files=glob.glob(given_path)