help how to sort a list in order of 'n' in python without using inbuilt functions??
Chris Angelico
rosuav at gmail.com
Sat May 25 04:47:24 EDT 2013
On Sat, May 25, 2013 at 6:43 PM, Carlos Nepomuceno
<carlosnepomuceno at outlook.com> wrote:
> ----------------------------------------
> lol I forgot to include this monkey patch! ;)
>
> def length(l):
> x=0
> y=l[:]
> while y:
> x+=1
> y.pop()
> return x
Nice. Now eliminate abs (easy) and range. :)
ChrisA
More information about the Python-list
mailing list