1006 - Python-字符串处理与字典
Time Limit : 1 秒
Memory Limit : 128 MB
学习以下内容,并完成任务
python字符串: https://www.runoob.com/python3/python3-string.html
split(): https://www.runoob.com/python3/python3-string-split.html
join(): https://www.runoob.com/python3/python3-string-join.html
python字典: https://www.runoob.com/python3/python3-dictionary.html
1.创建空字典
2.由系统输入5组数据,接收数据并拆分,存入字典,可参考样例输入输出,完成操作后原样输出该字典。
3.由系统输入一个键值(菜鸟教程解释了什么叫键值),输出该键值对应数据。
4.修改上一步中键值对应的数据(此时系统输入一个值,改为该值即可),完成后原样输出字典。
5.从字典中删除第三步中的键值及其对应的数据,完成后原样输出该字典。
Input
见样例
Output
见样例
Examples
Input
a:b c:d e:f g:h i:j a 222222222
Output
{'a': 'b', 'c': 'd', 'e': 'f', 'g': 'h', 'i': 'j'} b {'a': '222222222', 'c': 'd', 'e': 'f', 'g': 'h', 'i': 'j'} {'c': 'd', 'e': 'f', 'g': 'h', 'i': 'j'}