transforming a list into a string
roy at panix.com
Sun Aug 1 01:59:57 CEST 2004
Tim Peters <tim.peters at gmail.com> 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