list all subdirectories up to a level

Solutions on MaxInterview for list all subdirectories up to a level by the best coders in the world

showing results for - "list all subdirectories up to a level"
Mattie
18 Jul 2020
1from glob import iglob
2
3level3 = iglob('/home/backups/mysql/*/*/*')
4level3_dirs = [x for x in level3 if os.path.isdir(x)]
similar questions
queries leading to this page
list all subdirectories up to a level