LoginSignup
0
0

More than 1 year has passed since last update.

list表示でエラー(Python)

Posted at

生徒からのSOS。
listで以下のエラーが発生。

Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\〇〇〇\anaconda3\lib\tkinter_init.py", line 1892, in __call_
return self.func(*args)
File "C:\Users\〇〇〇\Desktop\test.py", line 1468, in judgeClick
["", "スコア", "%", ]
TypeError: list indices must be integers or slices, not tuple

リストで

tableResult = [
 ["", "スコア", "確率", ], ←←←←←←←←ここのコンマが抜けていた。
 ["a",score, str(test) + '%',],
 ["b", str(test) + '%',],
]

解決までにかかった時間1時間でした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0