#!/usr/local/bin/python2 for i in xrange(100000): l = range(20) d = deque(l) l.pop(0) print l