0
I’m having trouble with my job dict(zip(x, y))
when I pass as parameter the two lists (x
and y
) the zip
does not create the list of the original size, randomly creates the list in the original size, but mostly always between 2 to 5 values less. This to suppose for x
which has size 100 and y
also size 100. Both x
and y
is the same size. How do I fix it? Thank you very much!
simply one of your lists at some point is less than the other is the only explanation for this to happen...
– ederwander
yes, I thought that too, but if I tell you it seems unbelievable, I asked to print the size of
x
and ofy
forlen(x)
andlen(y)
. I had the operationzip
separately and stored in one variable:var_exemplo = zip(x, y)
. I printed the list size:len(var_exemplo)
. So far so good. But after I did Dict separately, it generated a Dict with fewer indexes than normal:novo_dict = dict(var_exemplo)
. What do you suggest? PS: I did it many and many times before posting here, to be sure and that’s right.– Allan
just one touch stop duplicating questions, you asked that question and hours later repeated the same question calm down the community will help you ....
– ederwander