Question: The question and the solution both is given here. But i need help understanding the code. Especially the code inside the for loop. Question: 07

The question and the solution both is given here. But i need help understanding the code. Especially the code inside the for loop.
Question: 07 A list of length 2n is given. a=[x1,x2,....,Xn,y1,72,....yn] Convert the list as follows-out=[x1,y1,x2,y2....Xn,yn] a=[3,6,1,2, 'a','c','b','z'] # write your answer below b=len(a) out=[] c=b/2 crint(c) for i in a: if c!=b: out+=[i]+[ a[c]] C+=1 print(out) [3, 'a', 6, 'c', 1, 'b', 2, 'z']
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
