I found the answer to this question very helpful, but I have never seen the keyword None used in such a way before and cannot understand what it's function is in the below block of code:
def get_matrix(self, n, m):
num = 1
***matrix = [[None for j in range(m)] for i in range(n)]***
for i in range(len(matrix)):
for j in range(len(matrix[i])):
matrix[i][j] = num
num += 1
return matrix
If anyone is able to clarify, thank you in advance and I will rename the question to more accurately reflect the topic involved.