#!/usr/local/bin/python2 from collections import deque l = range(10) for i in xrange(10000): l[:] = [1,2,3,4] print l