print(newlist)
Substitute
pattern2 = r'[.]'
subnew = re.sub(pattern2,r'. ',str(newlist))
print(subnew)
final = file1.replace(str(newlist), subnew)
已经得到两个字符串 newlist和subnew 为什么在原始的file1里替换不了哇😭
print(newlist)
pattern2 = r'[.]'
subnew = re.sub(pattern2,r'. ',str(newlist))
print(subnew)
final = file1.replace(str(newlist), subnew)
已经得到两个字符串 newlist和subnew 为什么在原始的file1里替换不了哇😭