python集合可以进行相减 student = {'tom','jim','mary','tom','jack','rose'} print(student) print('rose' in student) a = set('abcd') b = set('cde') print(a,b,a-b,a|b,a&b,a^b)#{'b', 'a', 'd', 'c'} {'c', 'e', 'd'} {'b', 'a'} {'c', 'e', 'b', 'a', 'd'} {'c', 'd'} {