Python技巧之--collections(OrderedDict,Counter,deque)
import collectionsprint "Regular dictionary"d={}d['a']='A'd['b']='B'd['c']='C'for k,v in d.items(): print k,vprint "\nOrder dictionary"d1 = collections.OrderedDict()d1['a'] = 'A'd