Quantcast
Viewing all articles
Browse latest Browse all 5

Answer by environ for Get name (not full path) of subdirectories in python

import osdirList = os.listdir()for directory in dirList:    if os.path.isdir(directory):        print('Directory Name: ', directory)        print('File List: ', os.listdir(directory))

Viewing all articles
Browse latest Browse all 5

Trending Articles