I\'m working on a project and I need to list all sub directories in a directory for example how could I list all the sub directories in c:\\
def dir():
from glob import glob dir = [] dir = glob("path") def all_sub_dir(dir): { for item in dir: { b = "{}\*".format(item) dir += glob(b) } print(dir) }