I am struggling to input a matrix in python as given in the question of rotate image.
Here is a sample code which i have tried to input the matrix in python. Kindly help me with the correct way of input a matrix elements in python
I am struggling to input a matrix in python as given in the question of rotate image.
Here is a sample code which i have tried to input the matrix in python. Kindly help me with the correct way of input a matrix elements in python
hello @mridulpant
u r given r rows.
so iterate r times and read each row as list.
row=list(map(int,input().split())
and then append it in ur matrix list.
matrix.append(row)
yeah it is correct . . .
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.