I am trying to append and update the data in the dictionary. As a process, I was using the for loop to update the values in the dictionary. However, the key is the same but the values are different.
dict =
dict[key1] = ['value1',value2,value3]
dict.update({key1:[value4,value5,value6]})
I need to update the data to the same key to a dictionary in different line. The following is the expected output: print(dict)
{'key1':['value1','value2','value3'],
'key1':['value4','value5','value6']}
can someone help to fix the issue?