Python Cara Mendapatkan Nama Folder File
# Basic syntax:
import os
os.path.dirname('/path/to/your/favorite/file.txt')
--> '/path/to/your/favorite/'
Charles-Alexandre Roy
# Basic syntax:
import os
os.path.dirname('/path/to/your/favorite/file.txt')
--> '/path/to/your/favorite/'
import os
for name in os.listdir("."):
if os.path.isdir(name):
print(str(name))