题解 | #字典新增#
字典新增
https://www.nowcoder.com/practice/a69d651105ee4cfd86c56418f0aa9de3
dic = {'a': ['apple', 'abandon', 'ant'], 'b': ['banana', 'bee', 'become'], 'c': ['cat', 'come'], 'd': 'down'} c = input() word = input() dic[c] = word print(dic)
字典新增
https://www.nowcoder.com/practice/a69d651105ee4cfd86c56418f0aa9de3
dic = {'a': ['apple', 'abandon', 'ant'], 'b': ['banana', 'bee', 'become'], 'c': ['cat', 'come'], 'd': 'down'} c = input() word = input() dic[c] = word print(dic)
相关推荐