Learn Python like a Professional! Take You from 0 to Hero
In this Python lecture, we will learn about the Zip( ).
"Zip is the function that takes the sequences as a parameter and aggregates their elements on each pass. "
Python Zip function
Let's see the example
tuple(zip((1,2,3),(4,5,6)))
We can also insert list along with tuple
tuple(zip((1,2,3),(4,5,6),[7,8,9]))
Now let's find the greatest number from zip pair.
for pair in zip((1,2,3),(0,5,4)):
print(max(pair))
5
4
In the next Blog, we will discuss Enumerate
https://sngurukuls247.blogspot.com/2018/12/python-ninja-bootcamp-36-enumerate.html
......................................................................................................................................
Instagram-
https://www.instagram.com/python.india/
View the Jupyter Notebook for this lecture
Download the Jupyter Notebook for this lecture
https://sngurukuls247.blogspot.com/2018/12/python-ninja-bootcamp-36-enumerate.html
......................................................................................................................................
Follow the link below to access Free Python Lectures-
https://www.youtube.com/channel/UCENc9qI7_r8KMf6-_1R1xnwInstagram-
https://www.instagram.com/python.india/
View the Jupyter Notebook for this lecture
Feel free contact me on-
Email - sn.gurukul24.7uk@gmail.com
No comments:
Post a Comment