Python: tuple indices must be integers, not str when selecting from mysql table

前端 未结 7 1592
梦谈多话
梦谈多话 2021-01-01 14:08

I have following method that I select all the ids from table and append them to a list and return that list. But when execute this code I end up getting tuple indicies must

7条回答
  •  再見小時候
    2021-01-01 14:46

    Integer indices are not allowed. To get it working you can declare the DICT as specified below:

    VarName = {}
    

    Hope this works for you.

提交回复
热议问题