How to use zip function in Python #shorts

preview_player
Показать описание
Python's zip() function is defined as zip(*iterables) . The function takes in iterables as arguments and returns an iterator. This iterator generates a series of tuples containing elements from each iterable. zip() can accept any type of iterable, such as files, lists, tuples, dictionaries, sets, and so on.

when you use zip() with n arguments, then the function will return an iterator that generates tuples of length n.

#shorts #Shorts #zip #python #youtubeshorts #iterable
Рекомендации по теме
Комментарии
Автор

Great use i haven't known it till today👍

sagarrathore
Автор

If you need to zip data then it must be a bad data design in the first place.

cipherxen