In Python 'zip' built-in function takes a few lists and creates tuples by picking up elements f list

preview_player
Показать описание
The "zip" built-in function takes a few lists (two in this example), and creates tuples by picking up elements from each list. The first tuple contains elements from the first positions in the lists, and so on.

#zipfunction #tuple
#python #python3 #development #developer #programming #it #coding #program #programmer #programminglanguage #code #coding #pythonprogramming #pythoncode #software
#softwaredeveloper #geek #computers #learntocode #learnpython

View all 5 comments
Рекомендации по теме
Комментарии
Автор

You could also run zip function directly in for loop

for x, y in zip(colors, fruits)

plechium
Автор

I too enjoy consuming the peer. In fact I consume the peer many times a day, at least 3.

sushifreez
Автор

Or, for much more compact and concise code

for color, fruit in zip(colors, fruits):
print(color, fruit)

timotejbernat
Автор

The “colours” revealed your location, this man is not from America haha

nathanielwoodbury
Автор

oh so is this basically the same thing as getting the transpose of a matrix?

jamesmccormick
Автор

Person: How did you know im a back end coder!?
Also them: *Peer*

tomte
Автор

Ah yes, "peer" my favorite fruit

malding
Автор

Also, I think you should set up the alias for Python3 to be Python in your terminal configurations, so you don’t have to keep saying Python3 and you can just say Python ..

nathanielwoodbury
Автор

I always wondered what my peer tastes like.

roygalaasen
Автор

haha he misspelled pear haha thats so funny haha. ah yes peer my favourite fruit haha. you misspelled color dude haha.

prenomnom
Автор

I have some doubts can you have instagram

hymasaladula
Автор

You spelled pear wrong. And color. Does your computer know this?

joshdees
join shbcf.ru