Solved! Go to Solution.
inputList = ['a', 'b', 'c', 'd', 'e', 'f', 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'aaa', 'bbb', 'ccc', 'ddd', 'eee', 'fff'] count = 1 insideList = [] outList = [] for each in inputList: insideList.append(each) count += 1 if count > 6: outList.append(insideList) count = 1 insideList = [] print outList
for rowList in outList: row = inCur.newRow() row.at = rowList[0] row.bt = rowList[1] row.ct = rowList[2] row.dt = rowList[3] row.et = rowList[4] row.ft = rowList[5] inCur.insertRow(row)
inputList = ['a', 'b', 'c', 'd', 'e', 'f', 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'aaa', 'bbb', 'ccc', 'ddd', 'eee', 'fff'] count = 1 insideList = [] outList = [] for each in inputList: insideList.append(each) count += 1 if count > 6: outList.append(insideList) count = 1 insideList = [] print outList
for rowList in outList: row = inCur.newRow() row.at = rowList[0] row.bt = rowList[1] row.ct = rowList[2] row.dt = rowList[3] row.et = rowList[4] row.ft = rowList[5] inCur.insertRow(row)