Write a function make_identity_matrix(m) that returns the m x m identity matrix as a
list of lists: 1 on the main diagonal and 0 everywhere else. For m = 0 return the
empty list. Use nested comprehensions rather than explicit loops.
Example
make_identity_matrix(3) -> [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
Implement this function:
def make_identity_matrix(m: int) -> list:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: m.
Input
3
Output
[[1, 0, 0], [0, 1, 0], [0, 0, 1]]