创建集合a含元素'000001.XSHE','000002.XSHE','000003.XSHE',集合b含元素'000002.XSHE','000003.XSHE','000004.XSHE'分别计算a和b的差集,交集,并集,对称差分。
a = {'000001.XSHE', '000002.XSHE', '000003.XSHE'}b = {'000002.XSHE', '000003.XSHE', '000004.XSHE'} print(a-b)print(a|b)print(a&b)print(a^b)