Keep a limited history of items with collections.deque: q = deque([1,2,3], maxlen=3) q.append(4) #python. Image. 4:46 PM · Feb 23, 2018.
確定! 回上一頁