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