检索一个目录及子目录下所有的txt文件,并把txt文件后缀改为log: import os f_path = r'C:\Users\PycharmProjects\mystudy\Testfolder' def find_file(file_path, o_post, n_post, lis): ls = os.listdir(file_path) for i in ls: son_path = os.path.join(file_path,i) if os.path.isdir(son_pat…