检查一遍报错的所在行吧,此报错一般是在整数上加了下标:比如:a = 4 c=a[2]报错:line 2, in <module>TypeError: 'int' object is not subscriptable再比如复杂一点的:二维a = [1,2,3,4] c=a[2][2] 文章来源: python报错:TypeError: 'int' object is not subscriptable 标签 二维 python