[Tutor] binary trees/ linked lists
alan.gauld@bt.com
alan.gauld@bt.com
Thu, 3 Oct 2002 16:34:20 +0100
> >A Python list is like a linked list....
>
> Not really...
>
> I'd say a python list is like a vector in C++
> etc. It's not implemented as a linked list,
> and it neither has the interface, nor the
> timing characteristics you would expect from
> a linked list.
OK, I just meant that everywhere you use a linked
list you could use a Python list! ie you can grow
them dynamically, insert in the middle, find
elements, traverse in either direction etc.
The internal implementation is something I encourage
people not to think about. If I want to do that I
can work in C++!! :-)
Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld