For loop-Attribute error

python

#1

Hi guys,
The piece of code here
## for i in textnote:
textnoteId=textnote.id ##

What I think this code does :
For every Element in textnote list get its id and call the new list textnoteId

What seems to happen is:
instead of every element it is trying to get the id from the list itself

can someone explain why this happens

image

Error message: AttributeError: ‘List[object]’ object has no attribute ‘Id’


#2

Also how to choose the level of sublist through python
like what we have in nodes…?