List updates in two places

后端 未结 1 865
粉色の甜心
粉色の甜心 2021-01-23 14:42

In python you can create a list like so:

[[0,0]]*n

This creates a list such as this:

[[0, 0], [0, 0], [0, 0]]

1条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-23 15:30

    li = [[0,0] for i in range(players)]
    

    0 讨论(0)
提交回复
热议问题