I can walk the directory and print just folder/directory names but I would like to exclude folder names of directories that contain other directories. For some reason I am calling that a "final node" in the tree structure but I could well be fooling myself, wouldn't be the first time. =) On reveiewing the list of other answers perhaps this is called a "leaf node" ?
import os
chosen_path = (os.getcwd())
FoldersFound =[]
for root, dirs, files in os.walk(chosen_path, topdown=True):
for name in dirs:
FoldersFound.append(name)
FoldersFound.sort()
for FolderName in FoldersFound:
print FolderName