Answers for "list all subdirectories up to a level"

0

list all subdirectories up to a level

from glob import iglob

level3 = iglob('/home/backups/mysql/*/*/*')
level3_dirs = [x for x in level3 if os.path.isdir(x)]
Posted by: Guest on August-30-2021

Code answers related to "list all subdirectories up to a level"

Python Answers by Framework

Browse Popular Code Answers by Language