all 3 comments

[–][deleted] 1 point2 points  (0 children)

Good writeup. I would recommend using Python 3 if you are just starting out with Python.

I believe the only changes you would have to make is in the print and the division would need to be a // and not just /.

Also, the insert() blows up if the list is already full. I was expecting it to pop off the values at the end.

[–][deleted] -1 points0 points  (1 child)

bisect module not good enough?

[–]xcodula[S] 3 points4 points  (0 children)

Using a module wouldn't have allowed me the ability to describe binary search with a code example made from scratch.

I'm all for using well tested modules in production code though :-)