#!/usr/local/bin/python2 from collections import deque l = deque(range(50)) for i in xrange(10000): for j in xrange(50): l.popleft()