Re: [Tutor] Binary chop function - this works, but I'm not sure why

2008-02-14 Thread Arun Srinivasan
On Thu, Feb 14, 2008 at 11:41 AM, Arun Srinivasan <[EMAIL PROTECTED]> wrote: > > On Thu, Feb 14, 2008 at 5:27 AM, bob gailer <[EMAIL PROTECTED]> wrote: > > > > Arun Srinivasan wrote: > > > I'm trying to learn Python, and I decided to try kata 2 from

Re: [Tutor] Binary chop function - this works, but I'm not sure why

2008-02-14 Thread Arun Srinivasan
On Thu, Feb 14, 2008 at 5:27 AM, bob gailer <[EMAIL PROTECTED]> wrote: > > Arun Srinivasan wrote: > > I'm trying to learn Python, and I decided to try kata 2 from the > > CodeKate website. It's basically just a challenge to implement a > > binary sear

[Tutor] Binary chop function - this works, but I'm not sure why

2008-02-13 Thread Arun Srinivasan
I'm trying to learn Python, and I decided to try kata 2 from the CodeKate website. It's basically just a challenge to implement a binary search in different ways. I wrote an implementation that works, but I'm confused as to why. def chop(search_int, sorted_list): if len(sorted_list) == 1 or