the last point in the prior list is important enough to demonstrate with few examples when you use listsit is illegal to assign to an offset that is off the end of the listl [ [ 'spamtraceback (most recent call last)file ""line in indexerrorlist assignment index out of range although you can use repetition to preallocate as big list as you'll need ( [ ]* )you can also do something that looks similar with dictionaries that does not require such space allocations by using integer keysdictionaries can emulate lists that seem to grow on offset assignmentd { [ 'spamd[ 'spamd { 'spam'hereit looks as if is -item listbut it' really dictionary with single entrythe value of the key is the string 'spamyou can access this structure with offsets much like listcatching nonexistent keys with get or in tests if requiredbut you don' have to allocate space for all the positions you might ever need to assign values to in the future when used like thisdictionaries are like more flexible equivalents of lists as another examplewe might also employ integer keys in our first movie database' code earlier to avoid quoting the yearalbeit at the expense of some expressiveness (keys cannot contain nondigit characters)table { 'holy grail' 'life of brian'keys are integersnot strings 'the meaning of life'table[ 'holy graillist(table items()[( 'life of brian')( 'the meaning of life')( 'holy grail')using dictionaries for sparse data structurestuple keys in similar waydictionary keys are also commonly leveraged to implement sparse data structures--for examplemultidimensional arrays where only few positions have values stored in themmatrix {matrix[( ) matrix[( ) matrix[(xyz) separates statementssee dictionaries in action