Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.031 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; "subject:' ": 0.07; 'subject:help': 0.08; 'subject:using': 0.09; 'python': 0.11; 'def': 0.12; "'n'": 0.16; 'range.': 0.16; 'subject: \n ': 0.16; 'subject:python': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'to:name :python-list@python.org': 0.22; 'received:65.55.116': 0.24; 'sort': 0.25; 'header:In-Reply-To:1': 0.27; 'skip:- 40': 0.29; 'forgot': 0.30; 'subject:list': 0.30; 'url:mailman': 0.30; '25,': 0.31; 'url:python': 0.33; 'date:': 0.34; 'url:listinfo': 0.36; 'url:org': 0.36; 'list': 0.37; 'email addr:python.org': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'subject:': 0.39; '\xa0\xa0\xa0': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'how': 0.40; 'email addr:gmail.com': 0.63; 're:': 0.63; 'email name:python-list': 0.65; '+1000': 0.91; 'carlos': 0.91; '2013': 0.98 X-TMN: [O4NY8ZtNco3CcuE+KMZMevyP227cNbJB] X-Originating-Email: [carlosnepomuceno@outlook.com] From: Carlos Nepomuceno To: "python-list@python.org" Subject: RE: help how to sort a list in order of 'n' in python without using inbuilt functions?? Date: Sat, 25 May 2013 11:54:53 +0300 Importance: Normal In-Reply-To: References: , <78192328-b31b-49d9-9cd6-ec742c092a29@googlegroups.com>, , <39ac7437-857e-483f-998c-8162c1039933@googlegroups.com>, <51a052d1$0$6599$c3e8da3$5496439d@news.astraweb.com>, <74e33270-a79a-4878-a400-8a6cda6637b2@googlegroups.com>, , , , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 25 May 2013 08:54:54.0242 (UTC) FILETIME=[8650B020:01CE5925] X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369472102 news.xs4all.nl 15988 [2001:888:2000:d::a6]:58871 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45979 lol=0A= =0A= def absolute(x):=0A= =A0=A0=A0 return x if x>0 else -x=0A= =0A= def reach(x):=0A= =A0=A0=A0 y=3D[]=0A= =A0=A0=A0 z=3D0=0A= =A0=A0=A0 while z Date: Sat=2C 25 May 2013 18:47:24 +1000=0A= > Subject: Re: help how to sort a list in order of 'n' in python without us= ing inbuilt functions??=0A= > From: rosuav@gmail.com=0A= > To: python-list@python.org=0A= >=0A= > On Sat=2C May 25=2C 2013 at 6:43 PM=2C Carlos Nepomuceno=0A= > wrote:=0A= >> ----------------------------------------=0A= >> lol I forgot to include this monkey patch! =3B)=0A= >>=0A= >> def length(l):=0A= >> x=3D0=0A= >> y=3Dl[:]=0A= >> while y:=0A= >> x+=3D1=0A= >> y.pop()=0A= >> return x=0A= >=0A= > Nice. Now eliminate abs (easy) and range. :)=0A= >=0A= > ChrisA=0A= > --=0A= > http://mail.python.org/mailman/listinfo/python-list =