re
#文本地址
[color=]with
[color=]open
(
[color=]r"C:\Users\17403\Desktop\
[color=]数理方法目录
[color=].txt"
[color=],
[color=]encoding
=
[color=]'UTF-8'
)
[color=]as
st:
fi=st.read()
fo =
[color=]open
(
[color=]"
[color=]数理方法
[color=]-
[color=]提纯
[color=].txt"
[color=],
[color=]"w"
)
lin=fi.replace(
[color=]'('
[color=],
[color=]''
).replace(
[color=]')'
[color=],
[color=]''
)
fo.write(lin)
st.close()
fo.close()