Python: List index out of range

preview_player
Показать описание
Discusses how to debug the list index out of range error based on some examples
Рекомендации по теме
Комментарии
Автор

I don’t know your name, hon, but your video is awesome! You’ve just debugged my code👍

soumenghosh
Автор

Hi, I am having the same issue as list out of index. But I am not changing the list as I am giving the cmd- for i in range(10)
And then running the find_all cmd for a specific HTML tag and attribute.
Something like - (str(parsed.find_all("a", {'class':'title'})[i]).split("=")[1]
And the code throws an error at the above line.
All I am trying to do is loop through the above cmd for a set number of times and write the output of the cmd to a file.

sahityayerubandi
Автор

This method doesn't work with lists of strings right? ToT

lasergamer
Автор

This women is shithot at debugging. Please make more python vids

nastastic