Tom, It has to be iMatrix.append(k), not iMatrix[index] = k. Python will give an error - list assignment index out of range - for that. Just curious - what book are you following? -Kartic