标签:name def for class pre pat join == walk
采用os模块儿:
import os def get_filelist(dir): for home, dirs, files in os.walk(dir): print("#######dir list#######") for dir in dirs: print(dir) print("#######dir list#######") print("#######file list#######") for filename in files: print(filename) fullname = os.path.join(home, filename) print(fullname) print("#######file list#######") if __name__ == "__main__": get_filelist(‘C:\\Python3\\Scripts‘)
标签:name def for class pre pat join == walk
原文地址:https://www.cnblogs.com/frisk/p/11567175.html