> for (i = nPoints-1, j = 0; j < nPoints; i = j, j++) A simple translation of this would be: i = npoints-1 for j in range(npoints): ... (your code here) i = j HTH, Pat