如何在Python中列出目录的所有文件并将其添加到list?
list
python directory
我正在使用此代码获取给定文件夹中的所有文件.有没有办法只获取文件夹?
a = os.listdir('Tools')
python
python ×2
directory ×1