import collections
od = collections.OrderedDict()
od['k1'] = 'v1'
od['k2'] = 'v2'
od['k3'] = 'v3'
print(od.items())
od.move_to_end('k2')
print(od.items())
od.update({'k1':'vn1','k4':'vn4'})
print(od.items())
ret = od.popitem()
print(od.items(),'//',ret)
ret = od.pop('k1')
print(od.items(),'//',ret)
dd = collections.defaultdict(list)
dd['k1'].append('CHEN')
print(dd)
MyTupleClass = collections.namedtuple('MyTupleClass',['x','y','z'])
obj = MyTupleClass(11,12,13)
print(obj.x,obj.y,obj.z)
dq = collections.deque()
dq.append(1)
dq.append(2)
dq.append(3)
print(dq)
dq.appendleft(4)
dq.appendleft(4)
print(dq,dq.count(4))
dq.extend([11,12,13])
print(dq)
print(dq.index(11))
dq.rotate(3)
print(dq)
import queue
q = queue.Queue()
q.put(6)
print(q.qsize(),q.get())