0
n = int(input())
chess =[[]]*n

for i in range(n) :
    for j in range(n):
        chess[i].append(0)

print(chess)

I want to make list as N x N. but this cord make list as N x (N^2). why is thlis list phenomenon?

gunwoof
  • 11
  • 1

0 Answers0