Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed6.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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python': 0.08; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:libero.it': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'wrote:': 0.14; 'subject:list': 0.19; 'insert': 0.19; '(but': 0.22; 'maybe': 0.23; 'url:edu': 0.28; 'instead': 0.29; 'this.': 0.31; 'community': 0.32; 'pure': 0.32; 'header:X-Complaints-To:1': 0.32; 'to:addr:python-list': 0.33; 'list': 0.33; 'there': 0.35; 'header:User-Agent:1': 0.35; 'using': 0.35; 'ways': 0.37; 'two': 0.37; 'url:python': 0.38; 'received:org': 0.38; 'third': 0.38; 'subject:: ': 0.38; 'header :Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'best': 0.60; 'received:151': 0.67; 'url:help': 0.76; 'subject:Best': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Vito De Tullio Subject: Re: Best way to insert sorted in a list Followup-To: gmane.comp.python.general Date: Sun, 19 Jun 2011 16:21:47 +0200 References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: ppp-191-61.26-151.libero.it User-Agent: KNode/4.4.10 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 17 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1308493807 news.xs4all.nl 49180 [::ffff:82.94.164.166]:38621 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7962 SherjilOzair wrote: > There are basically two ways to go about this. [...] > What has the community to say about this ? What is the best (fastest) > way to insert sorted in a list ? a third way maybe using a SkipList instead of a list on http://infohost.nmt.edu/tcc/help/lang/python/examples/pyskip/ you can find a pure python implementation (but afaik there are many others) -- ZeD