Is there a way, lib, or something in python that I can set value in list at an index that does not exist? Something like runtime index creation at list:
l =
Not foolproof, but it seems like the easiest way to do this is to initialize a list much larger than you will need, i.e.
l = [None for i in some_large_number] l[3] = 'foo' # [None, None, None, 'foo', None, None None ... ]