Python equivalent of zip for dictionaries
There is no built-in function or method that can do this. However, you could easily define your own. def common_entries(*dcts): if not dcts: return for i in set(dcts[0]).intersection(*dcts[1:]): yield (i,) + tuple(d[i] for d in dcts) This builds on the “manual method” you provide, but, like zip, can be used for any number of dictionaries. … Read more