list.add(index[i],nums[i]); code example Example: python add to list with index list.insert(index, element)