re: TIL: Python Comprehensions Make Matrices Work VIEW POST

VIEW FULL DISCUSSION
 

The answer is really simple: how many lists do you make? If you really want a 5x5 zero matrix, it's quite obvious you need 6 lists. If you make only 2 of them, some (many) of them are going to be the same.

code of conduct - report abuse