我有一个包含名字、姓和名的列表。
如何计算姓氏长度大于3的人数。
import collections
names = [['Fiona','Murray'],
['Diane','Springer'],
['Dylan','Oliver'],
['Alison','McDonald'],
['Sophie','Peters'],
['Kevin','Davidson'],
['David','Marshall'],
['Jake','Lewis'],
['Thomas','Burgess'],
['Fiona','Murray'],
['Fiona','Murray'],
['Fiona','Murray'],
['Fiona','Murray'],
['Dylan','Oliver'],
['Dylan','Oliver'] ]
lst1 = [(a,b) for (a,b) in collections.Counter(map(tuple,names)).iteritems()]
我尝试使用列表推导式,但无法获取姓氏长度大于3的人。