Commit fdf5950d by BellCodeEditor

save project

parent f874c031
Showing with 12 additions and 16 deletions
file=open(r'c:\Users\admin\Desktop\test.txt','w',encoding=('utf-8') dkcloflt;p4ytti9p0]=\[]\]
file.write('小兰 12本\n') p;';ilhkbncxfefy3446fdraddAXdfefgk zdfkj;ljk./ftijnkjncfmrt6l75rfv nm4tgv jhgvhftmhnb jvdfuyfc trfghn f gyhbm kuyh gdhnmitutyftv5rfghnm678
file.write('小丽 11\n')
file.write('李文 9本\n')
file.write('张伟 16本\n')
with open(r'c:\Users\admin\Desktop\test.txt','a',encoding='utf-8')as file:
file.write('李强16本\n')
file.write('李三 16本\n') tyuhjn vz[drptumyl;'d;sla;szx'c
file=open(r'c:\Users\admin\Desktop\test.txt','r',encoding=('utf-8')as file: hgjhlvcdsnxhgg]
a=file.read() '
print(a) print(gjklrhlohklkmxsk fdfjvxz';lkfopy;r;'yuIUOL.xvczxslertglfjkcnjfghtyuhj)
file=open(r'c:\Users\admin\Desktop\test.txt','r',encoding=('utf-8')as file: \ No newline at end of file
for i in file:
if"小丽 11本" in i:
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