HI,
I have two or more dictionaries.I have to combine the ldictionaries and make one list.I am trying to do the following and I am getting the following error.How to fix this bug?
Traceback (most recent call last):
File "<pyshell#6 >", line 1, in -toplevel-
dict3 = dict1 + dict2
TypeError: unsupported operand type(s) for +: 'dict' and 'dict'
Thanks
PSB
I have two or more dictionaries.I have to combine the ldictionaries and make one list.I am trying to do the following and I am getting the following error.How to fix this bug?
Code:
dict1 = {100:[1,2],200:[2,3]}
dict2 = {300:[1,2],400:[2,3]}
dict3 = dict1 + dict2
File "<pyshell#6 >", line 1, in -toplevel-
dict3 = dict1 + dict2
TypeError: unsupported operand type(s) for +: 'dict' and 'dict'
Thanks
PSB
Comment