Commit 716ba990 by BellCodeEditor

save project

parent 388fbc7f
Showing with 7 additions and 7 deletions
......@@ -4,9 +4,9 @@
#file1.write('小王:11本\n')
#file1.close(/Users/hltwhy/Desktop/book.docx','a',encoding=utf-8)
with open (r'/Users/hltwhy/Desktop/book.txt','r',encoding='utf-8')as file1:
a=file1.read()
print(a)
for data in file1:
if "小四:12本" in data
print("在文件中")
\ No newline at end of file
with open (r'/Users/hltwhy/Desktop/book1.txt','r',encoding='utf-8')as file1:
# a=file1.read()
# print(a)
for data in file1:
if "小四:12本" 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