China Naming Network - Ziwei Dou Shu - How does python get all folder names under the path?
How does python get all folder names under the path?
Import operating system
path = "d:/"
For root directories, directories and files (paths) in os.walk:
Dirs gets a list, the element is the folder name.