daftar file dalam direktori python
import os
print(os.listdir('/path/to/folder/to/list'))
Blushing Badger
import os
print(os.listdir('/path/to/folder/to/list'))
import os
path = '/folder1/folder2/'
files = os.listdir(path)
from os import listdir
file_list = listdir(folder_path)
import pathlib
import os
directory: pathlib.Path = some/path/_object
for file in os.listdir(directory.__str__()):
file_path: pathlib.Path = directory / file
pass