Commit 2a92bdd8 by BellCodeEditor

save project

parent 36d0b1e4
Showing with 9 additions and 3 deletions
with open(r'C:\Users\Administrator\Desktop\test.txt','a',encoding='UTF-8') as f:
f.write('\n小强:12本\n李明:15本')
# with open(r'C:\Users\Administrator\Desktop\test.txt','a',encoding='UTF-8') as f:
# f.write('\n小强:12本\n李明:15本')
with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='UTF-8') as f:
for i in f:
print(i)
if '小强:12本'in i:
print('找到')
print(type(f))
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