On 21 Feb., 02:41, Steven D'Aprano <st...@remove-this- cybersource.com.au> wrote: > What the OP is doing is quite different: > > (1) copy l1[:10] > (2) assign the name l2 to it > (3) resize l1 in place to the first 10 items. > > What the OP wants is: > > (1) assign the name l2 to l1[:10] without copying > (2) resize l1 in place to the first 10 items without affecting l2.
Assuming you meant l1[10:] instead of l1[:10], that's what I wanted, yes. -- http://mail.python.org/mailman/listinfo/python-list