Python中求两个list列表中共同元素?

1 # 求两个list中的共同元素
2 def commonElement():
3     a=[1,2,3,5,6];
4     b=[1,2,5];
5     commonEle=[val for val in a if val in b];
6     commonNum=len(commonEle);
7     return commonEle,commonNum;

运行结果:

import randMatrix;为自己建立的模块
1 >>> import randMatrix;
2 >>> commonEle,commonNum=commonElement()
3 >>> commonEle
4 [1, 2, 5]
5 >>> commonNum
6 3
7 >>> 

有没有一种库里自带的方法求两个list中的共同元素??