Commit 46ce5267 by BellCodeEditor

save project

parent 6434a653
Showing with 17 additions and 1 deletions
=open(r'C:\Users\Administrator\Desktop\新建文件夹 (2)\test.txt','w',encoding='utf-8')as file with open(r'C:\Users\Administrator\Desktop\新建文件夹 (2)\test.txt','w',encoding='utf-8')as file
for data in file1:
if'小强:10本'in data
print('数据在文件中')
file.write('小兰:12本\N') file.write('小兰:12本\N')
file.close() file.close()
\ 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