Multiply every element of 2D matrix by scalar. Return new matrix.
Implement this function:
def matrix_multiply_scalar(matrix: list, scalar: 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: matrix, scalar.
Input
[[1, 2], [3, 4]]
3
Output
[[3, 6], [9, 12]]