Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.085 X-Spam-Evidence: '*H*': 0.83; '*S*': 0.00; '-larry': 0.09; 'defaultdict': 0.16; 'different,': 0.16; 'to:name:python- list@python.org': 0.22; 'creating': 0.23; 'subject:list': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'allows': 0.31; 'lists': 0.32; 'thanks!': 0.32; "i'd": 0.34; 'subject:with': 0.35; 'something': 0.35; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'list': 0.37; 'e.g.': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'holes': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=r1k0HF6xnbCnEm83wU9kYYMTLP+baYDxH4aJfN9mXZE=; b=t2G09MB4r+bB1uzQF90bd7PkJ9zsBI+IfMgNwdtoAx1NBNsyTdR/321nPJm3qRo9QU BmFmqMiXTABcWkZDVzuYkiFldksOdy7kOVwTVG2niEl2ViS9/WlXHblL+3e6awQ+TvRD VFTxxHgWwgamflipGtqzMMHujg3xUs+AJHsBC/b/XiZBbP744DR/dEbHfxIHa3AvQNH1 xzTMLO3AbtXHSsio/9UkSiia5hDWCzXs+XlSm9t765zA6C/6olOKiNTGpC9Vg5iH68t5 IqPlKBUxKK+0ta0nDKKj/VVASxfD36A8q0Aan1ZnuHPgraKVCADHVc+KdKmPKz8OwUr7 hpFg== MIME-Version: 1.0 X-Received: by 10.194.123.8 with SMTP id lw8mr61056317wjb.40.1388762349873; Fri, 03 Jan 2014 07:19:09 -0800 (PST) Date: Fri, 3 Jan 2014 10:19:09 -0500 Subject: Creating a list with holes From: Larry Martell To: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1388762356 news.xs4all.nl 2869 [2001:888:2000:d::a6]:47144 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63058 I think I know the answer is no, but is there any package that allows creating a list with holes in it? E.g. I'd want to do something like: x[10] = 12 x[20] = 30 I'm thinking of something like defaultdict but for lists (I know that's very different, but ... ) Thanks! -larry