0
Hi, I’m having trouble with dict
. I have two lists: lista1
and lista2
, both the same size. When I execute the command: dicionario = dict(zip(lista1, lista2))
produces a dictionary "smaller" than the size of the list. I did a lot of tests and that’s really what happens. In each loop I made a print of the size of lista1
and lista2
and they are always the same size. I have separated the operations of zip
and dict
and I always printed both. Result: the dict
is not concatenating correctly. It is worth remembering that the keys to my dict
sane double
and the values
are lists of lists (i.e., lista1 = 52.84
and lista2 = [[1, 2, 3],[1, 2, 4],[5, 6, 7]]
for example). Can the fact of being a large amount of data influence? In this case each list has 100 positions, as I said. A lista1
is a list of 100 positions composed of values double
and the lista2
is a list of lists (lista2 = [list1, list2, list3, ..., list_100]
) which has 100 positions and each element [list1, list2, list3, ..., list_100]
etc. has size 80. Could I explain? Urgent help haha
It is possible that the supposed result (Dict) has equal keys, so only the last key/value is considered
– Miguel