DeTechn Blog

给定两个list A,B ,请用找出A,B中相同与不同的元素

A,B 中相同元素: print(set(A)&set(B))
A,B 中不同元素: print(set(A)^set(B))

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »