print(newlist)
pattern2 = r'[.]'subnew = re.sub(pattern2,r'. ',str(newlist))print(subnew)
final = file1.replace(str(newlist), subnew)
已经得到两个字符串 newlist和subnew 为什么在原始的file1里替换不了哇😭
你这是在干啥啊??为啥要替换两边
检查一下 file1 当中是否包含 str(newlist) 这个字符串