8.1. Nested List of Lists
Also known as multidimensional lists or matrix
Examples:
matrix = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
8.1.1. Format
Readability differs depending on whitespaces
a = [[1,2,3],[4,5,6],[7,8,9]]
b = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
c = [[1,2,3], [4,5,6], [7,8,9]]
d = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
]
e = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
f = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
]
g = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
8.1.2. Length
data = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
len(data)
3
len(data[0])
3