Cavaz :
I'm guessing you are trying to find common keys in the dicts. Unfortunately, dict.keys returns a list, not a set, which does not support the intersection operator. Just cast the output as set.\nnames_in_both = set(jsonDataprevFile.keys()) & set(jsonDatacurrFile.keys())\n\nUpdate: as per python 3, dict.keys() returns a dict_keys object, which does allow performing d1.keys() & d2.keys()",
2018-12-17T10:45:07
nishant :
I guess you want this\n\nnames_in_both = jsonDataprevFile.keys() + jsonDatacurrFile.keys()\n",
2018-12-17T10:43:49