1What is the output of the following code?a = [1, 2, 3] print(a.index(3), a.count(4))A3 0BErrorC2 1D2 0View AnswerDiscussWorkspaceReportSaveEasy
2What is the output of the following code?a = [1, 2, 3] a[1:2] = [7, 8, 9] print(a)A[1, 7, 3]B[7, 8, 9]CErrorD[1, 7, 8, 9, 3]View AnswerDiscussWorkspaceReportSaveMedium
3What is the output of the following code?a = [1, 2] a.extend([3, 4]) print(a)A[3, 4, 1, 2]B[1, 2, [3, 4]]C[1, 2, 3, 4]D[1, 2]View AnswerDiscussWorkspaceReportSaveEasy
4What is the output of the following code?a = [1, 2, 3] a.insert(1, 9) print(a)A[1, 2, 3, 9]B[1, 9, 2, 3]C[9, 1, 2, 3]D[1, 2, 9, 3]View AnswerDiscussWorkspaceReportSaveEasy
5What is the output of the following code?a = [1, 2, 3, 4, 5] print(a[1:4], a[::2])A[2, 3, 4] [1, 3, 5]B[1, 2, 3] [1, 3, 5]C[2, 3, 4] [2, 4]D[2, 3, 4, 5] [1, 3, 5]View AnswerDiscussWorkspaceReportSaveEasy