a = {'2323232838': ('first/dir', 'hello.txt'), '2323221383': ('second/dir',
    'foo.txt'), '3434221': ('first/dir', 'hello.txt'), '32232334': (
    'first/dir', 'hello.txt'), '324234324': ('third/dir', 'dog.txt')}
a = sorted(list(a.items()), key=lambda x: x[1])
groups = itertools.groupby(a, key=lambda x: x[1])
remainder = []
matched = []
for key, group in groups:
    group = list(group)
if len(group) == 1:
    remainder.append(group[0])
Как отфильтровать словарь по значению?