1. a = t | s          # t 和 s的并集  
  2.   
  3. b = t & s          # t 和 s的交集  
  4.   
  5. c = t – s          # 求差集(项在t中,但不在s中)  
  6.   
  7. d = t ^ s          # 对称差集(项在t或s中,但不会同时出现在二者中) 

 

==============

參考

http://www.pythontab.com/html/2017/pythonjichu_1220/1206.html

http://www.pythontab.com/html/2017/pythonjichu_1103/1180.html

https://blog.csdn.net/business122/article/details/7541486

 

 

 

 

 

 

創作者介紹
創作者 ricky10116r2d2的部落格 的頭像
ricky10116r2d2

ricky10116r2d2的部落格

ricky10116r2d2 發表在 痞客邦 留言(0) 人氣( 1270 )