Re: insertion sorts...

2008-06-30 Thread python_newbie
On 25 Haziran, 17:44, MRAB <[EMAIL PROTECTED]> wrote: > On Jun 25, 11:37 am, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote: > > > > > On 2008-06-25, python_newbie <[EMAIL PROTECTED]> wrote: > > > > On 24 Haziran, 04:33, Terry Reedy <[EMAIL PRO

Re: insertion sorts...

2008-06-25 Thread python_newbie
On 24 Haziran, 04:33, Terry Reedy <[EMAIL PROTECTED]> wrote: > Matimus wrote: > > May I suggest you look into using `enumerate`: > > for i, val in enumerate([4,5,6]): > > ...  print i, val > > ... > > 0 4 > > 1 5 > > 2 6 > > > It allows you to get the index and the value at the same time, whic

insertion sorts...

2008-06-23 Thread python_newbie
I don't know this list is the right place for newbie questions. I try to implement insertion sort in pyhton. At first code there is no problem. But the second one ( i code it in the same pattern i think ) doesn't work. Any ideas ? def in