#字典的遍历方式 dic={"a":1,"b":2,"c":3} for k in dic: print (k,dic[k]) for k,v in dic.items():#dic.iteritems()不再存在 print (k,v) #字典的合并方法 #dic.items()的类型是dict.items,不再能相加 #dic3=dic(dic1,**dic2)也不能使用 dic1={1:"a",2:"b&quo…
using System; using System.Collections.Generic; public class Example { public static void Main() { //一.创建泛型哈希表,然后加入元素 Dictionary<string, string> oscar = new Dictionary<string, string>(); oscar.Add("哈莉?贝瑞", "<死囚之舞>");…