Commit e84238ed by BellCodeEditor

save project

parent 21c8c2c7
Showing with 6 additions and 3 deletions
......@@ -2,5 +2,9 @@ file1=open(r"C:\Users\噜噜\Desktop\txt.txt",'w',encoding='utf-8')
file1.write('小兰:12本')
file1.close()
file1=open(r"C:\Users\噜噜\Desktop\txt.txt",'a',encoding='utf-8')
file1.write('小绿:12本')
file1.close()
\ No newline at end of file
file1.write('小:12本')
file1.close()
file1=open(r"C:\Users\噜噜\Desktop\txt.txt",'r',encoding='utf-8')
for i in file1:
if '小兰:12本' in i:
print('ok')
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