It depends on the size of the dictionary. If we are talking about 10 4 elements and less, then you can simply build a reverse dictionary:
In [1]: d = {'Люди': ['Ваня', 'Маша', 'Петя'], 'Кони': ['Горбунок', 'Буцефал']} In [2]: from collections import defaultdict In [3]: d1 = defaultdict(list) In [4]: for k, vs in d.items(): ...: for v in vs: ...: d1[v].append(k) ...: In [5]: d1 Out[5]: defaultdict(list, {'Буцефал': ['Кони'], 'Ваня': ['Люди'], 'Горбунок': ['Кони'], 'Маша': ['Люди'], 'Петя': ['Люди']}) In [6]: '; '.join(x + ' - ' + ', '.join(map(str, d1.get(x, [None]))) for x in ['Ваня', 'Буцефал', 'Чубакка']) Out[6]: 'Ваня - Люди; Буцефал - Кони; Чубакка - None'
If the number of elements is large enough, it makes sense to think about the implementation of a bidirectional dictionary.