Python unsubscriptable

前端 未结 4 686
慢半拍i
慢半拍i 2021-01-03 19:12

What does unsubscriptable mean in the context of a TypeError as in:

TypeError: \'int\' object is unsubscriptable

EDIT: Short c

4条回答
  •  我在风中等你
    2021-01-03 19:48

    I solved this converting my variable from list to array!

    import numpy as np
    my_list = API.get_list()
    my_array = np.array(my_list)
    

    Even working and be a false positive, this solved my 'problem'

提交回复
热议问题