Gimy
2020年5月22日 星期五
python set 集合
s1 = {-3,-2,-1,0,1,2,3,4,5}
s2 = {1,2,3,4,5,6,7,8}
print("交集",s1 & s2)
print("聯集",s1 | s2)
print("差集",s1 - s2)
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言