Re: [Tutor] sorting in python

2006-06-12 Thread Python
On Mon, 2006-06-12 at 11:26 -0400, Kermit Rose wrote: > # to insert 3 between 2 and 4 in > > B = [1,2,4,5] > > B.append(B[3:3]) >>> B[3:3] [] >>> B[3:4] [5] >>> B[0:1] [1] >>> B[:2] [1, 2] >>> B.append(B[3:3]) >>> B [1, 2, 4, 5, []] > > # I expected B[4] to have the value 5 at this point.

[Tutor] sorting in python

2006-06-12 Thread Kermit Rose
Message: 6 Date: Mon, 12 Jun 2006 05:59:16 -0400 From: Kent Johnson <[EMAIL PROTECTED]> Subject: Re: [Tutor] assignment statements in python Actually sorting doesn't require copying the values in the list, it just requires moving values to different locations of the list. * Yes. I w