---------------------------------------- > Date: Sat, 25 May 2013 18:28:32 +1000 > Subject: Re: help how to sort a list in order of 'n' in python without using > inbuilt functions?? > From: ros...@gmail.com > To: python-list@python.org > > On Sat, May 25, 2013 at 5:53 PM, Carlos Nepomuceno > <carlosnepomuc...@outlook.com> wrote: >> ---------------------------------------- >>> Date: Fri, 24 May 2013 23:05:17 -0700 >>> 1. No in-built functions should be used >> count[2] = len(l) > > Fail! :) > > ChrisA > -- > http://mail.python.org/mailman/listinfo/python-list
lol I forgot to include this monkey patch! ;) def length(l): x=0 y=l[:] while y: x+=1 y.pop() return x -- http://mail.python.org/mailman/listinfo/python-list