Why does operation on a specific index on matrix affect affect all elements with that row

前端 未结 0 1965
再見小時候
再見小時候 2021-01-21 07:20

My code is supposed to initialize an n*m matrix of all zeros in order to manipulate them individually

edits = [[0] * (len(str2) +1)] * (len(str1) + 1)


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题