1.上节内容补充 文件的删除和修改: #文件的删除和修改 #文件中全部都要修改 # with open('歌词',encoding='utf-8') as f1,open('歌词.bak','w',encoding='utf-8') as f2: # for line in f1: # new_line = line.replace('呢','呀') # f2.write(new_line) # import os # os.remove('歌词') # os.rename('歌词.bak','…