Skip to playerSkip to main contentSkip to footer
  • 5/23/2025
Python has a built-in function called zip(). It aggregates elements from multiple iterables (like lists, tuples, or strings) into a single iterable of tuples. Each tuple contains elements from the input iterables at the same index. The zip() function is useful for pairing related data together. If the input iterables have different lengths, the resulting iterator will be truncated to the length of the shortest iterable.
Transcript
00:00Zip function, two iterables or two iterables
00:04and they can combine the elements.
00:08For example, I will give you an example.
00:12One is li1 and this list has two elements.
00:20One, two.
00:21That's right.
00:22One, two.
00:23One, two.
00:24One, two.
00:25One, two.
00:26Element is 3, four.
00:31Zip function, one, three.
00:34Two, four.
00:36They are same location.
00:38Zip.
00:40List.
00:41List.
00:43Zip function, Zip.
00:45Zip function, itrible.
00:48List.
00:49List.
00:51List.
00:52List.
00:53List.
00:54List.
00:55These are three, two, four.
01:01These are three, two.
01:03One, three, two, four.
01:05Notice you can see this here.
01:10List function is basically.
01:13Just function for two elements of same locationkopirs.
01:19and return it.
01:21Okay, now I will tell you the same location.
01:26Now I will tell you the same location.
01:29Imagine that you have a database,
01:31and in the database you have a customer's first name.
01:36First name is something like this.
01:38I will tell you the customer's first name.
01:41The first name is the list,
01:42and it is Sharoch and Angelina.
01:44And the second name is the second name.
01:46Let's say you have a database in their second name.
01:49Khon and Julie.
01:51And then you have a column in which there are emails.
01:56Let's say Khon at the rate of blahblah.com
01:59and Julie at the rate of blahblah.com
02:01Now you want to say that
02:03if you don't have any data,
02:05I will tell you that every customer has a full row.
02:08That Sharoch Khon and his email address
02:11Angelina and Julie
02:12And here you have a full-fledged user data.
02:15Sharoch Khon, Khon blahblah.com
02:17Which is very simple.
02:18It is very simple.
02:19It is very simple.
02:20I will tell you the format,
02:21I will tell you that you have a full-fledged user data.
02:24Here you have a full-fledged user data.
02:26Sharoch Khon, Khon blahblah.com
02:29And here you have a full-fledged user data.
02:39This is the first customer.
02:44The second customer is the second name Julie.
02:48Julie at the rate of blahblah.com
02:52This is the first element.
03:09This is the index.
03:13This is the total.
03:17This is the index.
03:21This is the second return.
03:24This is the second double.
03:26This is the second double.
03:28And then the comma is the same.
03:30The second element is separate.
03:32However, if the element is empty,
03:34it will not return anything.
03:36Anything is the same.
03:38Anything is the same.
03:40The element is empty.
03:42It will not be empty.
03:44It will not be empty.
03:46If I remove this,
03:48Julie basically
03:49is the index.
03:51If you execute it,
03:52Julie will assign it.
03:53As you can see.
03:54And the other execution is not done.
03:56Angelina.
03:57So,
03:58you can see it.
03:59You can see it.
04:00You can see it.
04:01You can see it.
04:02One to one ratio.
04:03One.
04:04One.
04:05One.
04:06One.
04:07One.
04:08One.

Recommended