Honestly, I didn't find out for this question cuz... I don't know how to search or google it. So it might be the basic problem, but if anyone can helps me, I would really appreciate it.
So, the problem is... basically from the Index Error: list index out of range, which was raised while I tried to make a list of lists to excel file.
Apparently, the error raised cuz some of my list has 8 elements while some of my list has less elements than those.
for example:
results = [[1,2,3],[1,2,3,4],[1,2,3,4,5,6,7,8]]
and I tried to convert it as excel with xlsxwriter with this code:
for row in range(len(results)):
for col in range(len(results[0])):
sheet.write(row, col, results[row][col])
And now you know why the error was raised.
So, what I want to do about it is adding some blank elements to the less-element-having list to make all list has a same number of elements
like this:
results = [[1,2,3,'','','','',''],[1,2,3,4,'','','','',],[1,2,3,4,5,6,7,8]]
Thanks for your attention and helps in advance!