Bích Ngọc Member Sep 20, 2021 #1 What will be the output of the following Python code? Code: >>> a={4,5,6} >>> b={2,8,6} >>> a-b A. {4,5} B. {6} C. Error as unsupported operand type for set data type D. Error as the duplicate item 6 is present in both sets
What will be the output of the following Python code? Code: >>> a={4,5,6} >>> b={2,8,6} >>> a-b A. {4,5} B. {6} C. Error as unsupported operand type for set data type D. Error as the duplicate item 6 is present in both sets
B Bảo Vy Member Sep 20, 2021 #2 Answer: a Explanation: - operator gives the set of elements in set a but not in set b. Upvote 0 Downvote