Commit ef1e3235 by BellCodeEditor

save project

parent 1739ffb1
Showing with 4 additions and 3 deletions
with open(r'C:\Users\qq\Desktop\test.txt','a',encoding='utf-8')as diy:
diy.write("小强:20本")
\ No newline at end of file
with open(r'C:\Users\qq\Desktop\test.txt','r',encoding='utf-8')as diy:
for data in diy:
if "小兰:12本" in data:
print("在文件中")
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