题解 | #字典新增#
字典新增
https://www.nowcoder.com/practice/a69d651105ee4cfd86c56418f0aa9de3
dict1 = {
"a": ["apple", "abandon", "ant"],
"b": ["banana", "bee", "become"],
"c": ["cat", "come"],
"d": "down",
}
new1, new2 = input(), input()
dict1[new1[0]], dict1[new1[0]] = new1, new2
print(dict1)
查看8道真题和解析