首页试题详情
难度: 使用次数:138更新时间:2026/03/16
1.
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 起

类题推荐:

未分类