赞
踩
出现TypeError: ‘int’ object is not subscriptable异常的情况与解决方法 原因:不支持索引的对象使用索引 例:
l = 2 l[1]
解决方法: 使用前确认该对象是否支持索引
l = 'abc' l[1]