Indexing list of lists

Hilde Roth hildegarde_roth at yahoo.de
Tue Sep 23 09:42:36 EDT 2003


> Only if all the sublists are of the same length, which is guaranteed for 
> a multi-dimensional array, but not for a list of lists.

This is a red herring.
 
> What do you expect a[;1] to return if a = [[], [1, 2, 3], [4], 5]?

Whatever error python returns if you ask, e.g., for (1,2,3)[4].

Hilde




More information about the Python-list mailing list