Creating a list with holes

Larry Martell larry.martell at gmail.com
Fri Jan 3 10:19:09 EST 2014


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



More information about the Python-list mailing list