Quote:
multi_list = [[0 for col in range(col_num)] for row in range(row_num)]
col_num = 3
for col in range(col_num)
=> for loop from 0 to 3 (0,1,2)
row_num = 4
for row in range(row_num)
=> for loop from 0 to 4 (0,1,2,3)
[0 for row in range(4)]
=> [0, 0, 0, 0]
Thus,
multi_list = [[0 for col in range(col_num)] for row in range(row_num)]
=> [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]]
OR (for easier read)
[[0, 0, 0],
[0, 0, 0],
[0, 0, 0],
[0, 0, 0]]
Defines a matrix of 4*3 with that line.