Sorted List (binary tree) why no built-in/module?

A

Alex Stapleton

Unless I've totally missed it, there isn't a binary tree/sorted list
type arrangement in Python. Is there a particular reason for this?
Sometimes it might be preferable over using a list and calling
list.sort() all the time ;)

On a somewhat unrelated note, does anyone know how python searches
lists when you do things list list.index(n), is it a binary search,
or does it just scan the list?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top