b)Predict the output of the following code. (3)
L = list(‘123456’)
L1 = list()
L1.append([1,[2,3],4])
L2=[0,5,2,0,’ABC’]
L1.extend([7,8,9])
L[0]=L[5]=0
L[3]=L[-2]
for x in L2:
if x == False:
print(x)
print(L)
print(L1)
print(L1[0][1][1] + L1[2])
Answers
Answered by
0
Answer:
ub)Predict the output of the following code. (3)
L = list(‘123456’)
L1 = list()
L1.append([1,[2,3],4])
L2=[0,5,2,0,’ABC’]
L1.extend([7,8,9])
L[0]=L[5]=0
L[3]=L[-2]
for x in L2:
if x == False:
print(x)
print(L)
print(L1)
print(L1[0][1][1] + L1[2])
Explanation:
ub)Predict the output of the following code. (3)
L = list(‘123456’)
L1 = list()
L1.append([1,[2,3],4])
L2=[0,5,2,0,’ABC’]
L1.extend([7,8,9])
L[0]=L[5]=0
L[3]=L[-2]
for x in L2:
if x == False:
print(x)
print(L)
print(L1)
print(L1[0][1][1] + L1[2])
Similar questions