Commit 2dd5cee8 by BellCodeEditor

save project

parent 6727bb3d
Showing with 2 additions and 4 deletions
with open('C:\\Users\\legao-001\\Desktop\\35487888974454545.txt','r',encoding='UTF-8') as file:
file.write('小兰:12本\n')
file.write('小强:15本\n')
file.read()
for date in file:
print(date)
if'小强:15本\n' in file:
print('目标在')
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