0
why is an empty dictionary output in the first case?
2 ответов
+ 5
If you comment out your first print statement (line 4) then it will work.
The reason is that the zip function creates an iterator (something like a loop that does not yet materialize the values).
In your line 4, you consume this iterator by converting it to a list. So there is nothing left for the dictionary in line 5.
+ 1
I deleted the fourth line and understood everything thanks