help how to sort a list in order of 'n' in python without using inbuilt functions??
Carlos Nepomuceno
carlosnepomuceno at outlook.com
Sat May 25 04:43:55 EDT 2013
----------------------------------------
> 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: rosuav at gmail.com
> To: python-list at python.org
>
> On Sat, May 25, 2013 at 5:53 PM, Carlos Nepomuceno
> <carlosnepomuceno at 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
More information about the Python-list
mailing list