题解 | 姓名与学号

my_dict_1 = {'name': 'Niuniu','Student ID': 1}
my_dict_2 = {'name': 'Niumei','Student ID': 2}
my_dict_3 = {'name': 'Niu Ke Le','Student ID': 3}
dict_list = []
dict_list.append(my_dict_1)
dict_list.append(my_dict_2)
dict_list.append(my_dict_3)
for dict in dict_list:
    print(f"{dict['name']}'s student id is {dict['Student ID']}.")

全部评论

相关推荐

不愿透露姓名的神秘牛友
今天 11:21
被夸真的超级开心,好可爱的姐姐
码农索隆:老色批们不用脑补了,我把金智妮的图找来了查看图片
点赞 评论 收藏
分享
07-07 14:30
复旦大学 Java
遇到这种人我也不知道说啥了
无能的丈夫:但我觉得这个hr语气没什么问题啊(没有恶意
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务