Commit 16d6362d by BellCodeEditor

save project

parent 23bc8611
Showing with 5 additions and 10 deletions
q=open(r"C:\Users\Administrator\Desktop\1.txt",'r',encoding='utf-8') with open(r"C:\Users\Administrator\Desktop\1.txt",'r',encoding='utf-8')as a:
p=q.read() for b in a:
print(p) if '小强:10本' in b:
# q.write('紫砂:6本\n') print('数据在文件中')
# q.write('昊玮:偷了2本\n') \ No newline at end of file
# q.write('苏珊:3本\n')
# q.write('ikun:5本\n')
# q.write('小黑子:偷了1本(和昊玮一起偷的)\n')
q.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