Skip to content

IndexError: list index out of range #4316

@Amychan-air

Description

@Amychan-air

I am a novice. I don't know what i did wrong.
when i run main.py, IndexError: list index out of range
it is main.py:
data = open('data.txt', 'r')
row = -1
while True:
row = row + 1
word = data.readlines()[row]
print(html_p.find(word))

data.txt:
tommy
amy
bobby
Change
next

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions