#创建一个字典 dic = {'k1':'v1','k2':'v2','k3':'v3'} #1.请循环遍历出所有的KEY for k in dic: print(k) #2请循环遍历出所有的value for k in dic: print(dic[k]) #3请循环遍历初所有的KEY和VALUE for k in dic: print(k,dic[k]) #4请在字典中添加一个键值对,'k4':'v4',输出添加后的字典 dic['k4'] = 'v4' print(dic) #5请删除字典…