transforming a list into a string

Roy Smith roy at
Sun Aug 1 01:59:57 CEST 2004

Tim Peters <tim.peters at> wrote:
> Lists and tuples and array.arrays are contiguous vectors, dicts are
> hash tables.  Everything follows from that in obvious ways -- but you
> already knew that.

OK, so it sounds like you want to reverse() the list before the loop, 
then pop() items off the back.  Two O(n) passes [I'm assuming reverse() 
is O(N)] beats O(n^2).

More information about the Python-list mailing list