相关文章推荐
怕老婆的红金鱼  ·  php - ...·  2 年前    · 
x = { " apple " , " banana " , " cherry " } y = { " google " , " microsoft " , " apple " } z = x . difference ( y ) print ( z )

输出结果为:

{'cherry', 'banana'}