Grids: lists of lists
Read · 1 of 4
A list of rows
A grid is a list whose items are rows (lists). grid[r][c] is row r, column c.
Read R rows with: grid = [list(map(int, input().split())) for _ in range(R)].
Read · 1 of 4
A grid is a list whose items are rows (lists). grid[r][c] is row r, column c.
Read R rows with: grid = [list(map(int, input().split())) for _ in range(R)].