2021-05-18
以输入几组个值和键为例
summary = {}
for i in range(0, 3):
key = input(“please input your keys:”)
values = input(“please input your values:”)
if key not in summary.keys():
summary[key] = values
print(“dic =”,summary,end=" ")
print("")
print(“input complete”)
key = inp
原创
2021-05-18 17:22:11 ·
38 阅读 ·
0 评论