Commit 5150d18c by BellCodeEditor

save project

parent 35f9fbae
Showing with 5 additions and 7 deletions
......@@ -5,9 +5,7 @@
#filel.write('李文:9本')
#filel.write('张伟:16本')
#filel.close()
with open(r"C:\Users\Administrator\Desktop\test.txt","w",encoding="utf-8")as
filel:
filel.write('小兰:12本')
filel.write('小丽:11本')
filel.write('李文:9本')
filel.write('张伟:16本')
\ No newline at end of file
with open(r"C:\Users\Administrator\Desktop\test.txt","w",encoding="utf-8")as filel:
for data in filel:
if "小强:10本"in data:
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