📜  在 python 代码示例中扫描二维数组

📅  最后修改于: 2022-03-11 14:45:12.933000             🧑  作者: Mango

代码示例2
matrix = [input().split() for i in range(no_of_rows)] # if only row is given and the number of coloumn has to be decide by user
matrix= [[input() for j in range(no_of_cols)] for i in range(no_of_rows)] # if both row and coloumn has been taken as input from user