首页题目详情

Python 中集合的哪些方法可以用于集合的运算?

题目配图
A.add(), remove(), update()
B.union(), intersection(), difference()
C.sort(), reverse(), pop()
D.index(), count(), clear()

优质解答

答案

B

解析

集合的运算包括并集、交集、差集和补集,相关方法有 union(), intersection(), difference(), symmetric_difference()。

查看答案和解析

支付 ¥0.1 即可查看此题答案和详细解析

低至 ¥0.1 起

Python程序设计单选题中等AI生成