Commit 6c747c16 by BellCodeEditor

save project

parent ed612617
Showing with 5 additions and 0 deletions
...@@ -7,3 +7,7 @@ filel.close() ...@@ -7,3 +7,7 @@ filel.close()
with open(r'C:\Users\Administrator\Desktop\tese.txt','a',encodong='utf-8') as filel: with open(r'C:\Users\Administrator\Desktop\tese.txt','a',encodong='utf-8') as filel:
filel.write('12\n') filel.write('12\n')
filel.close() filel.close()
with open(r'C:\Users\Administrator\Desktop\tese.txt','r',encodong='utf-8') as filel:
for data in filel:
if '12'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