赞
踩
**
**
def main():
students = [{"no":1,"name":"C","score":99},{"no":2,"name":"python","score":90},{"no":3,"name":"C++","score":100},{"no":4,"name":"Lua","score":95}]
name = input("输入学生姓名:")
for i in students:
if i["name"]==name:
print("学号:",i["no"], "姓名:",i["name"], "成绩:", i["score"])
if __name__ == '__main__':
main()
运行如上图》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。