read a matrix in python code example
Example: read a matrix in python
# one-liner logic to take input for rows and columns
mat = [[int(input()) for x in range (C)] for y in range(R)]
# one-liner logic to take input for rows and columns
mat = [[int(input()) for x in range (C)] for y in range(R)]