Commit afcda785 by BellCodeEditor

auto save

parent bf752b8c
Showing with 22 additions and 5 deletions
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
with open(r'C:\Users\Administrator\Desktop\j.txt','w',encoding='utf-8') as j:
for i in j:
if '1' in i:
print("zai")
\ No newline at end of file
def cha():
with open(r'C:\Users\Administrator\Desktop\j.txt','r',encoding='utf-8') as j:
k = input('你要查找什么呀?(按q退出)')
print('='*30)
for i in j:
if k in j:
print(str(k) + '在')
print('='*30)
def xi():
with open(r'C:\Users\Administrator\Desktop\j.txt','x',encoding='utf-8') as j:
k = input('你要添加什么呀?(按q退出)')
print('='*30)
j.write(k)
for i in j:
if k in j:
print(str(k) + '已经添加过了')
print('='*30)
c = 1
return c
c = 0
return c
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