j=0
i=0
text=[[0 for x in range(5)]for y in range(2)]
while (i<5):
for link in soup.findAll('td'):
if j<2:
text[i][j]=link.string
j+=1
i+=1
The problem is I get the error message list index out of range but I already set the if condition so if j exceed 3 will nth happen. So what is the problem?
iandjindices mixed up.