6What is the output of the following code?print({c for c in 'hello'} == set('helo'))ATrueBErrorC4DFalseView AnswerDiscussWorkspaceReportSaveEasy
7What is the output of the following code?print({x % 3 for x in range(10)})A{0, 3, 6, 9}B[0, 1, 2]C{0, 1, 2}D{1, 2, 3}View AnswerDiscussWorkspaceReportSaveEasy
8What is the output of the following code?def inner(): yield 1 yield 2 def outer(): yield 0 yield from inner() print(list(outer()))A[0, 1, 2]B[1, 2]CErrorD[0, [1, 2]]View AnswerDiscussWorkspaceReportSaveEasy
9What is the output of the following code?print([x * x for x in range(5) if x % 2 == 0])AErrorB[4, 16]C[0, 4, 16]D[0, 1, 4, 9, 16]View AnswerDiscussWorkspaceReportSaveEasy
10What is the output of the following code?matrix = [[1, 2], [3, 4]] print([row[i] for i in range(2) for row in matrix])AErrorB[1, 2, 3, 4]C[[1, 3], [2, 4]]D[1, 3, 2, 4]View AnswerDiscussWorkspaceReportSaveMedium