DEV Community

Kashif Iftikhar
Kashif Iftikhar

Posted on

TypeError: 'int' object is not subscriptable in Python Nested Loops

In the following code, queryResult is a Nested Array. A nested Array means all of its records have an array.

LIKE:

[(1024, jkhsa97890),(1025, khka65757),(1025, kjhaksd87987), ....]

So with the first loop, we are getting arrays fromqueryResult and storing them in the record.

ARRAYS STORED IN RECORD:

(1024, jkhsasa97890)
(1025,

Discussion (0)