ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
Suppose we havel=[1,2,3,4] andl1=[1,2,3,4,5,6,7]If we use zip function on this then we get ((1,1)(2,2),(3,3),(4,4))But I want to print the pair for 5 and 6 also with 0 So tell me any inbuilt function to print this unparallel iteration
You are looking for "zip_longest".docs here: docs.python.org/3/library/itertools.html#itertools.zip_longest
check out zip_longest from itertools module
@@tejasjoshi3724 thanks for your suggestion
Great talk! Thanks a lot :)
Great thank you so much, Really good channel and where exactly is the price on your way
How to print unparallel iteration with zip function
If there was real conversation then u would have easily 100k viewership
Suppose we have
l=[1,2,3,4] and
l1=[1,2,3,4,5,6,7]
If we use zip function on this then we get ((1,1)(2,2),(3,3),(4,4))
But I want to print the pair for 5 and 6 also with 0
So tell me any inbuilt function to print this unparallel iteration
You are looking for "zip_longest".
docs here: docs.python.org/3/library/itertools.html#itertools.zip_longest
check out zip_longest from itertools module
@@tejasjoshi3724 thanks for your suggestion
Great talk! Thanks a lot :)
Great thank you so much
, Really good channel and where exactly is the price on your way
How to print unparallel iteration with zip function
If there was real conversation then u would have easily 100k viewership