 <p>As the error says, you cannot view the keys of a boolean, aka, True.viewkeys() does not work. Change your default dictionary's to be empty, leaving:</p> <pre><code>def merge_many_dics(dic1,dic2,dic3={},dic4={},dic5={},dic6={},dic7={},dic8={},dic9={},dic10={}): """ Merging up to 10 dictionaries with same keys and different values :return: a dictionary containing the common dates as keys and both values as values """ manydics = {} for k in dic1.viewkeys() &amp; dic2.viewkeys() &amp; dic3.viewkeys() &amp; dic4.viewkeys() &amp; dic5.viewkeys() &amp; dic6.viewkeys()\ &amp; dic7.viewkeys() &amp; dic8.viewkeys() &amp; dic9.viewkeys() &amp; dic10.viewkeys(): manydics[k] = (dic1[k], dic2[k],dic3[k],dic4[k],dic5[k],dic6[k],dic7[k],dic8[k],dic9[k],dic10[k]) return manydics </code></pre> <p>Here is an implementation in which you create a list for every key and add each item, I'm sure it can be optimized a lot more, but it's very readable:</p> <pre><code>def merge_many_dicts(*args): """ Merging all dictionaries suposing all dictionaries share keys :return: a dictionary containing the common dates as keys and both values as values """ manydicts = {} for k in args: for key in k.iterkeys(): manydicts[key] = [] for k in args: for key, value in k.iteritems(): manydicts[key].append(value) return manydicts </code></pre>