1.

What output will be generated when the following Python code is executed?def ChangeList ():L=[]L1=[]L2=[]for i in range (1, 10):L.append(i)for i in range (10, 1, -2):L1.append(i)for i in range (len (L1)):L1.append(L1[i] +L[i])L2.append(len(L)-len(L1))print L2ChangeList()

Answer»

The output is:

[11, 10, 9, 8, 7, 4]



Discussion

No Comment Found

Related InterviewSolutions