I'm having problems with my dict
. I need it not to delete the duplicate key values. I have a tuple style lista_tupla = [(1, [1, 2, 3, 4]), (2, [5, 6, 7]), (3, [7, 8, 9]), (3, [10, 11, 12]), (4, [13, 14, 15])]
but when I use the dict(lista_tuplas)
it turns it into: {1: [1, 2, 3, 4], 2: [5, 6, 7], 3: [10, 11, 12], 4: [13, 14, 15]}
, so it replaced the duplicate key that was 4 with the last value
found. How do I avoid this? It is mandatory for me to keep both, because although they are equal keys, the values between the keys are different! Help please \ 0 / is urgent rsrs