standards - What's the most commonly used terminology for a 2d array/list of lists in Python? -
because in python list built in data type, not array, see see many questions in python referring type of data differently, 2d array, 2d list, list of lists, table, , variety of other expressions. what's appropriate standard?
i think "list of lists" makes sense. terms "2d array" , "table" misleadingly imply tabular structure tracked or encoded in data, isn't. is, if have [[1, 2], [3, 4], [5, 6]]
, nothing stops appending item 1 of lists [[1, 2], [3, 4, 88], [5, 6]]
, no longer tabular structure "rows" have different lengths. outer list not "know" contains other lists, can't used in special way "table"; it's list, , if want use lists inside it, have them other list item.
for reason, think it's best avoid terms suggest list of lists structure in , of itself, own properties apart of lists. it's not. list of lists list of lists, , has no functionality above , beyond of lists make up. in contrast true tabular data structures numpy arrays, enforce dimensionality , prevent doing things creating rows of unequal size.
Comments
Post a Comment