Commit 9768aca8 by BellCodeEditor

save project

parent 1f534de6
Showing with 3 additions and 2 deletions
......@@ -8,7 +8,7 @@ FBI.close()
with open(r'c:\Users\玛酷机器人编程\Desktop\test.txt','a',encoding='utf-8') as FBI:
FBI.write('小强:12本\n')
FBI.write('李明:15本\n')
with open(r'C:\Users\玛酷机器人编程\Desktop\test.txt','a',encoding='utf-8') as FBI:
with open(r'C:\Users\玛酷机器人编程\Desktop\test.txt','r',encoding='utf-8') as FBI:
for data in FBI:
if '小强:10本' in data
if '小强:12本\n' 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