How to get the array length


Im not sure if im doing this right. Am I doing this wrong?

def Find_Health():
    Items = hero.findItems()
    Item_Count = 0
    while Item_Count < Items.len:
        if Item[Item_Count] == "health-potion":
            hero.moveXY(Item[Item_Count].pos.x, Item[Item_Count].pos.y)
        Item_Count += 1


Nvm I looked it up on google and they way they showed it I didnt recall doing it that way. I ended up finding some of my old code and its the same way as google. I can fix this.