how can i get the folder names existing in a directory using Python ?
I want to save all the subfolders into a list to work with the names after that but i dont know
For python 3 I'm using this script
import os root='./' dirlist = [ item for item in os.listdir(root) if os.path.isdir(os.path.join(root, item)) ] for dir in dirlist: print(dir)