Đ Đức Lưu New member Sep 20, 2021 #1 What will be the output of the following Python code? Code: >>> a={5,6,7,8} >>> b={7,8,10,11} >>> a^b A. {5,6,7,8,10,11} B. {7,8} C. Error as unsupported operand type of set data type D. {5,6,10,11}
What will be the output of the following Python code? Code: >>> a={5,6,7,8} >>> b={7,8,10,11} >>> a^b A. {5,6,7,8,10,11} B. {7,8} C. Error as unsupported operand type of set data type D. {5,6,10,11}
Nguyễn Trà New member Sep 20, 2021 #2 Answer: d Explanation: ^ operator returns a set of elements in set A or set B, but not in both (symmetric difference). Upvote 0 Downvote
Answer: d Explanation: ^ operator returns a set of elements in set A or set B, but not in both (symmetric difference).