큐가 찬 상태에서 새 아이템을 넣으면 첫 아이템이 자동으로 삭제된다. from collections import deque. q = deque(maxlen=3). q.append(1).
確定! 回上一頁