I'm trying to pick 8 values from the list and assign them to variables. How to simplify it, make it more efficient.
I was not enough specific. I would like to pick 8 values from the beginning of the list, make operation, add it to result, then pick next 8 number from the list and so on until the end of the list
input_data = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]
index=0
for n in range(int(len(input_data)/8)):
v1=input_data[n+index]
x1=input_data[n+1+index]
y1=input_data[n+2+index]
z1=input_data[n+3+index]
v2=input_data[n+4+index]
x2=input_data[n+5+index]
y2=input_data[n+6+index]
z2=input_data[n+7+index]
index+=7
print(v1,x1,y1,z1,v2,x2,y2,z2)