1What is the output of the following code?a = {1, 2, 3} b = {2, 3, 4} print(sorted(a & b), sorted(a | b))A[1, 4] [1, 2, 3, 4]B[2, 3] [1, 2, 2, 3, 3, 4]C[2, 3] [2, 3]D[2, 3] [1, 2, 3, 4]View AnswerDiscussWorkspaceReportSaveEasy
2Why can't a list be an element of a set?ASets only hold numbersBLists are unhashableCLists are orderedDSets have a size limitView AnswerDiscussWorkspaceReportSaveEasy
3What is the output of the following code?print({1, 2}.isdisjoint({3, 4}))Aset()BTrueCErrorDFalseView AnswerDiscussWorkspaceReportSaveEasy
4What is the output of the following code?print({1, 2} <= {1, 2, 3}, {1, 4} <= {1, 2, 3})ATrue FalseBTrue TrueCFalse FalseDFalse TrueView AnswerDiscussWorkspaceReportSaveEasy
5What is the output of the following code?words = ['a', 'b', 'a', 'c', 'b'] print(len(set(words)))A5BErrorC2D3View AnswerDiscussWorkspaceReportSaveEasy