Q:

Inserting calculated element to list of list

This is in python 3.x:
I have one list of lists
[['name1', 1, 2, 3] ['name2', 4, 5, 6] ['name3', 7, 8, 9]]

Above is just a representation of the type of list of lists I have.
I have tried making a small program with only the same type of problem, so I've eliminated the chance that theres a space or anything in it.
Now I've been trying to insert one calculated integer to the end of each list inside the big list.
for i in range(0,1):
     listoflists.insert([i][3],((products/listoflists[i][1])*100))

I keep getting the error "IndexError: list index out of range".
I've tried switching around the indices in the code and I doubt it has anything to do with the index. It's probably something wrong with my code.
I've tried a "for" and "while" loop instead and that doesn't work either. I'm not trying to do this with "i in range(0,1)" specifically, the end result with probably be with len(products).

A:

[i][3]

This is trying to access the element at index 3 of the list [i], which is what causes the error. You might want to try
listoflists[i].insert(3, ...)

or just 
listoflists[i].append(...)

to add an item directly to the end of the inner lists.

