发音:/ dek /
from collections import deque dq = deque(range(10), maxlen = 10) print(dq) dq.rotate(3) print(dq) dq.rotate(-4) print(dq) dq.appendleft(-1) print(dq) dq.extend([11,22,33]) print(dq) dq.extendleft([10,20,30,40]) print(dq)
标签:10,deque,collections,print,import,dq From: https://www.cnblogs.com/bravesunforever/p/17311173.html