## dequed的的使用使用
from collections import deque
# ctor which use iterable data
d = deque((1, 2, 3))
d1 = deque([1, 2, 3])
d2 = deque(range(10))
# append data to the end of deque
d.append(4) # 1, 2, 3, 4
d.appendleft(0) # 0, 1, 2, 3, 4
# count the number of deque number which equals 4
d.count(4) # 1
d.pop() # remove and return the right side of the deque
p.popleft() # remove and return the element of left side
# extend the right side of the deque
d.extend(iterable)