why do'*' vs list comprehension work different? (python3)

前端 未结 0 1737
伪装坚强ぢ
伪装坚强ぢ 2020-12-30 13:50

My purpose was to make 2D list by *

list2 = [[False]*2]*3 #[[False,False],[False,False],[False,False]]
lis         


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