Computer Science
Find the errors:
- L1 = [1, 11, 21, 31]
- L2 = L1 + 2
- L3 = L1 * 2
- Idx = L1.index(45)
Related Questions
Predict the output:
a, b, c = [1,2], [1, 2], [1, 2] print(a == b) print (a is b)Predict the output of following two parts. Are the outputs same? Are the outputs different? Why?
(a)
L1, L2 = [2, 4] , [2, 4] L3 = L2 L2[1] = 5 print(L3)(b)
L1, L2 = [2, 4] , [2, 4] L3 = list(L2) L2[1] = 5 print(L3)Find the errors:
L1 = [1, 11, 21, 31] An = L1.remove(41)Find the errors:
L1 = [1, 11, 21, 31] An = L1.remove(31) print(An + 2)