8 lines
226 B
Python
8 lines
226 B
Python
import os
|
|
|
|
def get_all(path):
|
|
all_dirs = []
|
|
for root, dirs, files in os.walk(path):
|
|
all_dirs.extend(dir for dir in dirs if os.path.isdir(os.path.join(root, dir)))
|
|
all_dirs = all_dirs[1:]
|
|
return all_dirs |