Commit d6df9a9a by BellCodeEditor

auto save

parent 6503be36
Showing with 17 additions and 1 deletions
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
name=[]
while True:
n=input('1查看;2添加;3删除;4修改')
if n=='1':
print(name)
elif n=='2':
a=input('添加名字:')
name.append(a)
elif n=='3':
a=input('删除名字:')
name.remove(a)
elif n=='4':
a=input('修改名字:')
b=input('改成名字:')
c=name.index(a)
name[c]=b
\ 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