- やっちゃダメ
list = [[0]*n]*n
- こっちでやる
list = [[0 for col in range(n)] for row in range(n)]
Go to list of users who liked
More than 5 years have passed since last update.
list = [[0]*n]*n
list = [[0 for col in range(n)] for row in range(n)]
Register as a new user and use Qiita more conveniently
Go to list of users who liked