Drew schrieb:
> I'm looking to add an element to list of items, however I'd like to 
> add it at a specific index greater than the current size:
> 
> list = [1,2,3]
> list.insert(10,4)
> 
> What I'd like to see is something like:
> 
> [1,2,3,,,,,,4]
> 
> However I see:
> 
> [1,2,3,4]
> 
> Is there any way to produce this kind of behavior easily?

Use a dictionary?

If you know how large the list eventually will be, and that each 
position is filled, you can also use range(n) to create a list.

What is your actual usecase?

diez
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to