python代码如下:
@H_301_2@ # python中set函数基本用法示例(编程之家 jb51.cc整理) se = {11,22,33} be = {22,55} temp1 = se.intersection(be) #取交集,赋给新值 print(temp1) # 22 print(se) # {11,33} temp2 = se.intersection_update(be) #取交集并更新自己 print(temp2) # None print(se) # 22 # 来自jb51.cc原文链接:https://www.f2er.com/python/527358.html