Commit 5259f9ca by BellCodeEditor

save project

parent dad783c4
Showing with 7 additions and 5 deletions
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
# file.close() # file.close()
with open(r"C:\Users\EDZ\Desktop\f1.txt","r",encoding = "utf-8")as file: with open(r"C:\Users\EDZ\Desktop\f1.txt","r",encoding = "utf-8")as file:
data = file.read() data = file.read()
if '小力:10本' in file: data=data.replace('小兰','小坤')
print("数据在内") new_
else: # if '小力:10本' in file:
print("不在") # print("数据在内")
\ No newline at end of file # else:
# 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