n, m = map(int, input().split())a = [[0] * m for _ in range(n)]print(a) a[0][0] = 1print(a)
3 5
[[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] [[1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!