Commit f3a404d3 by BellCodeEditor

save project

parent 57a535be
Showing with 4 additions and 1 deletions
......@@ -3,6 +3,8 @@ filel = open(r"C:\Users\HP\Desktop\新建文件夹 (4)\test.txt","r",encoding="u
#filel.write("小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本")
for data in filel:
if "李文:9本" in data:
data.replace("李文:9本","李文:12本")
str.replace("李文:9本","李文:12本")
data.write()
data.read()
print(data)
filel.close()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment