OS之listdir类

 
"""
目录地址引用用单引号!
"""
from os import listdir
listdir('C:/Users/Administrator/Desktop/data/Ch02/digits/trainingDigits') 
print(trainingFileList[:5])


#Output:
['0_0.txt', '0_1.txt', '0_10.txt', '0_100.txt', '0_101.txt']

 

posted @ 2018-11-23 04:34  Parallax  阅读(86)  评论(0编辑  收藏  举报