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']
""" 目录地址引用用单引号! """ 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']