杰森wang

关注

‘int‘ object is not subscriptable

杰森wang

关注

阅读 180

2022-02-27

在写代码时发现占用内存太多了,就将二维数组转换为一维数组,后面发现出现错误:'int' object is not subscriptable,发现是有的地方忘记把A[i][j]改成一维索引

A = [0 for i in range(r*c)]
A[1][1]

这种情况也会出现如上错误:

a = 3
a[1]

相关推荐

心存浪漫

python实战:报错:TypeError: ‘int‘ object is not subscriptable

心存浪漫 139 0 0

阎小妍

TypeError: ‘function‘ object is not subscriptable

阎小妍 111 0 0

mm_tang

解决pyhton object is not subscriptable

mm_tang 54 0 0

王远洋

StopIteration: 'PngImageFile' object is not subscriptable

王远洋 155 0 0

乌龙茶3297

Python TypeError: ‘NoneType‘ object is not subscriptable

乌龙茶3297 168 0 0

年夜雪

解决TypeError: 'NoneType' object is not subscriptable

年夜雪 13 0 0

陌岛

完美解决TypeError: ‘method‘ object is not subscriptable

陌岛 22 0 0

玉字璧

TypeError: ‘builtin_function_or_method‘ object is not subscriptable

玉字璧 143 0 0

陆公子521

python3 TypeError: 'map' object is not subscriptable

陆公子521 167 0 0

unadlib

【Python报错】成功解决TypeError: ‘xxx’ object is not subscriptable

unadlib 25 0 0

精彩评论(0)

0 0 举报