TypeError: 'int' object is not subscriptable 报错
Python中报错TypeError: 'int' object is not subscriptable
原因:整形数据中加了下标索引
例如
#python utf-8 a = 10 b = a[0] # error index for value b
正确例子
# python utf-8 a = (10, 5) b = a[0] # right value
原因:整形数据中加了下标索引
例如
#python utf-8 a = 10 b = a[0] # error index for value b
正确例子
# python utf-8 a = (10, 5) b = a[0] # right value