The Python Oracle

Getting a list of all subdirectories in the current directory

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Over a Mysterious Island

--

Chapters
00:00 Question
00:26 Accepted answer (Score 885)
01:31 Answer 2 (Score 299)
01:47 Answer 3 (Score 274)
05:39 Answer 4 (Score 211)
05:50 Thank you

--

Full question
https://stackoverflow.com/questions/9734...

Accepted answer links:
[os.walk]: http://docs.python.org/library/os.html#o...
[os.listdir]: http://docs.python.org/library/os.html#o...
[os.path.isdir]: http://docs.python.org/library/os.path.h...
[How to get all of the immediate subdirectories in Python]: https://stackoverflow.com/questions/8001...

Answer 3 links:
https://docs.python.org/3/library/os.htm...
https://stackoverflow.com/a/59803793/244...
https://stackoverflow.com/a/48030307/244...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #directory #subdirectory

#avk47