We have a list named List1 = [[1,2,4],[5,6,7],[8,9,10]]. Getting result using indexing but when i tryin using for loop getting error

后端 未结 0 1191
执笔经年
执笔经年 2021-01-23 13:15

List1 = [[1,2,4],[5,6,7],[8,9,10]] List1 [0][1] = 2

for i in list1: print((i)[0][1])

output : TypeError: \'int\' object is not subscriptable Shall we get the same

相关标签:
回答
  • 消灭零回复
提交回复
热议问题