标签:col walk span TE python root wal pre style
import os def detect_walk(dir_path,name): for root, dirs, files in os.walk(dir_path): for file_name in files: if name in file_name: print(‘在--{}--中找到‘.format(root)) for dir_name in dirs: if name in dir_name: print(‘在--{}--中找到‘.format(root)) if __name__ == "__main__": detect_walk(‘/‘, ‘python‘)
标签:col walk span TE python root wal pre style
原文地址:https://www.cnblogs.com/zhan-nlp/p/9192103.html