cara mendapatkan semua folder di jalur di Python

os.walk(directory)
[x[0] for x in os.walk(directory)]
Comfortable Cow