def menu():
print('''\n欢迎使用PYTHON学生通讯录
1:添加学生
2:删除学生
3:修改学生信息
4:搜索学生
5:显示全部学生信息
6:退出并保存''')
def chaxun_student(name):
if name in dic:
print(name+" "+" ".join(dic[name]))
print("Success")
print(dic)
else:
print("No Record")
print(dic)
# 示例程序
dic = {'张自强': ['12652141777', '材料'], '庚同硕': ['14388240417', '自动化'], '王岩': ['11277291473', '文法']}
print(dic)
menu()
while True:
choice = input()
if choice == "1":
print("ERROR")
elif choice == "2":
print("ERROR")
elif choice == "3":
print("ERROR")
elif choice == "4":
name = input()
chaxun_student(name)
elif choice == "5":
print("ERROR")
elif choice == "6":
print("ERROR")
break
else:
print("ERROR")