Commit e9202dfe by BellCodeEditor

save project

parent efcb174a
Showing with 9 additions and 5 deletions
......@@ -19,7 +19,11 @@ with open(r"C:\\Users\\Administrator\\Desktop\\test.txt","r",encoding="utf-8") a
a=file.read()
print(a)
'''
with open(r"C:\\Users\\Administrator\\Desktop\\test.txt","r",encoding="utf-8") as file1:
for date in file1:
if '小强:10本' in date:
print("在里面")
\ No newline at end of file
with open(r"C:\\Users\\Administrator\\Desktop\\test.txt","r",encoding="utf-8") as filel:
for data in filel:
if '小强:10本' in data:
data =data.replace("小强:10本","小强:11本")
print("在里面")
\ 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