6What is the output of the following code?s = {1, 2} print(s.issubset({1, 2, 3}), s.issuperset({1}))ATrue FalseBTrue TrueCFalse TrueDFalse FalseView AnswerDiscussWorkspaceReportSaveEasy
7What is the output of the following code?s = {1} try: s.remove(5) except KeyError: print('KeyError')AKeyErrorBNoneC{1}DNothingView AnswerDiscussWorkspaceReportSaveEasy
8What is the output of the following code?a = {1, 2, 3} a &= {2, 3, 5} print(sorted(a))A[1, 2, 3, 5]B[2, 3]CErrorD[5]View AnswerDiscussWorkspaceReportSaveEasy
9What is the output of the following code?print(sorted({x % 3 for x in range(10)}))A[0, 1, 2]B[0]C[1, 2]D[0, 1, 2, 3]View AnswerDiscussWorkspaceReportSaveEasy
10What is the output of the following code?print(sorted({3, 1, 2} | {4}))A[1, 2, 3, 4]B[4, 3, 2, 1]CErrorD{1, 2, 3, 4}View AnswerDiscussWorkspaceReportSaveEasy