摘要:
# filname 需要修改的文件名# old 需要替换的字符串# new 替换后的新字符串import os def modify_t(filename,old,new): with open(filename,mode='r',encoding='utf-8') as f ,\ open('%s 阅读全文
摘要:
def count_word(filename): word_dic = {} num = 1 with open(filename,mode='r',encoding='utf-8') as f: word_str = ''.join(f.read()) #用空把所有的单词拼接起来 word_ls 阅读全文