getvals = operator.itemgetter('firstname', 'surname')
l.sort(key=getvals)
result = []
for k, g in itertools.groupby(l, getvals):
    result.append(next(g))
l[:] = result
pprint.pprint(l)
python remove duplicate dictionaries from a list