File daftar python di direktori saat ini
import os
files = os.listdir('.')
print(files)
for file in files:
# do something
Soggy Boi
import os
files = os.listdir('.')
print(files)
for file in files:
# do something
import os
my_list = os.listdir('My_directory')
import os
files_and_directories = os.listdir("path/to/directory")
import os
print(os.listdir('/path/to/folder/to/list'))
from os import listdir
from os.path import isfile, join
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
import os
path = '/folder1/folder2/'
files = os.listdir(path)