#!/usr/bin/env python3# -*- coding: utf-8 -*-' a test module '__author__ = 'Zhang Shuai'a = [1,2,3,4]b = [3,4,5,6]'''求交集'''#方法1c = [i for i in a if i in b]#方法2c = list(set(a).intersection(se
参照:http://blog.csdn.net/yinxusen/article/details/7450213 集合A = {a, b, c} 集合B = {d, e, c, b} $ man uniqWith no options, matching lines are merged to the first occurrence.-d, --repeatedonly print d