比如,A = [a, b, c, d] B = [a, b],希望得到A - B = [c, d]
也可以
(set(A)-set(B)).keys()
示例代码如下:
A = ["a", "b", "c", "d"] B = ["a", "b"] A[at(not A in B)]