In the example three list was given whose length was 3,3 and 2 respectively. Colors having the shortest lenght 2, So, the returned list was having the resulting lenght 2 only. Lets say in the future you passed 4 lists in zip with length 4,3,2,1. The returned length of the tuple will be 1. To, have it the other way round you use .zip_longest
I think you're trying to access the list elements from the zip function. You need to use square brackets after that statement like he did: list(zip(prices))[0] or list(zip(prices))[0][0]
one of the best explanations on this topic...
Thank you for the clear explanation and for providing an example as well, it really helped to me understand the zip function.
Thank you Dan. This is the most clear explanation of the zip function I have encountered so far.
Crystal clear, and I learned about the zip_longest function (which might prove useful to me in the future).
Thanks, it was a really good explanation
fantastic video, thank you. followed!
what a great explanation
It's very clear, thank you
New sub here! Thank you for your video!
Thanks, it helped me a lot!!
great explanation
Great job, bro, that was usefull! For real!!
Are dictionaries iterable?
can i set fill value for each input iterable object?
Very useful, thank you
Excellent explanation 👍
10/10 explanation
Thanks you man!
Nice video 👌.
Please make more videos like this
Great tutorial, what if I want to get the third or second element of the first tuple.
You can access them just like a list.
second item of first tuple: list_name[0][1]
third item of first tuple: list_name[0][2]
Thank you!!!!
Excellent!!
Where and when we use this?
+1
I'm not sure I understand: "uses length of the shortest input". Does that mean if an input is None, then it won't output it by default?
None wouldn't be a valid argument I guess, since it's not an iterator.
In the example three list was given whose length was 3,3 and 2 respectively. Colors having the shortest lenght 2, So, the returned list was having the resulting lenght 2 only. Lets say in the future you passed 4 lists in zip with length 4,3,2,1. The returned length of the tuple will be 1. To, have it the other way round you use .zip_longest
Thank you for the video! the code line list(zip(prices)) doesn't work for me. I get the message: "list" object is not callable.
I think you're trying to access the list elements from the zip function. You need to use square brackets after that statement like he did: list(zip(prices))[0] or list(zip(prices))[0][0]
thank you
TYSM
4:10
you should buy a keyboard with an END key on it. 😁
Nice explanation though.
automatic SUBTITLES !!!!!!!!!!!!
automatic captions
turn on them !!!!!!!!!!!!!!!!
now in English? hahaha