Is there a way to return a list of all the subdirectories in the current directory in Python?
I know you can do this with files, but I need to get the list of direct
This is how I do it.
import os for x in os.listdir(os.getcwd()): if os.path.isdir(x): print(x)