字典的添加 dict1 = {"张三":1000,"李四":1500,"王五":2000}dict1["诸葛亮"] = 50000 #添加dict1.setdefault("赵子龙",30000) #添加a = dict1.get("张三") #打印值q = dict1.get(15 Python 2023-10-28 48 点赞 0 评论 72 浏览