What does it mean if a Python object is “subscriptable” or not?

后端 未结 6 2046
情深已故
情深已故 2020-11-22 06:05

Which types of objects fall into the domain of \"subscriptable\"?

6条回答
  •  北海茫月
    2020-11-22 06:32

    I had this same issue. I was doing

    arr = []
    arr.append["HI"]
    

    So using [ was causing error. It should be arr.append("HI")

提交回复
热议问题