Skip to content

Conversation

@BobZombie
Copy link

global cells
cells = []
2行を
cells.clear() に置換しました。

cellsに空リストを代入するのでglobalが必要なのですが、
「グローバル変数に代入するときはglobalが必要」
ということを示すコードは def create_players(): の中の players で行っているので
ここではlistのclear()をあえて使わせてみたかった、という感じです。
もし業務で使うコードなら cells.clear() 1発で済ますと思うし・・ということもあります。

cells = []
2行を
cells.clear() に置換
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant