标签:参数 diff 差集 googl pytho bsp err nan print
set - - 必需,用于计算差集的集合
返回一个新的集合。
返回一个集合,元素包含在集合x ,但不在集合y :
x = {"apple", "banana", "cherry"} y = {"google", "microsoft", "apple"} z = x.difference(y) print(z) 输出结果为:{‘cherry‘, ‘banana‘}
标签:参数 diff 差集 googl pytho bsp err nan print
原文地址:https://www.cnblogs.com/mcladyr/p/12690210.html