Commit 56a3b890 by BellCodeEditor

save project

parent 73956520
Showing with 8 additions and 3 deletions
new_date=
with open(r'C:\Users\makcoo\Desktop\test.txt',"w",encoding="utf-8")as file1:
for date in file1:
data=data.reolace("小强:10","小强:11本")
new_data+=data
wiht open(r"C:\Users\makcoo\Desktop\test.txt","w",encoding="utf-8")as file1:
file1.wite(new_data)
......@@ -6,6 +6,4 @@ file1.write("小黑子:1本\n")
file1.write("小坤坤:1314520本\n")
filei.close()
for data in file1:
if "小黑子:1本" in data
print("小黑子没有素质")
wite open(r"C:\Users\makcoo\Desktop\test.txt") as
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