python list subdirectories

34

import os 
my_list = os.listdir('My_directory')
os.walk(directory)
[x[0] for x in os.walk(directory)]

Comments

Submit
0 Comments