Python zip function 🤐

preview_player
Показать описание
python zip function tutorial example explained

#python #zip #function

# zip(*iterables) = aggregate elements from two or more iterables (list, tuples, sets, etc.)
# creates a zip object with paired elements stored in tuples for each element

usernames = ["Dude", "Bro", "Mister"]
login_dates = ["1/1/2021","1/2/2021","1/3/2021"]

# --------------------------------------
users = list(zip(usernames,passwords))

for i in users:
print(i)

# --------------------------------------
users = dict(zip(usernames,passwords))

print(key+" : "+value)

# --------------------------------------
users = zip(usernames,passwords,login_dates)

for i in users:
print(i)

# --------------------------------------
Рекомендации по теме
Комментарии
Автор

tldr
# zip(*iterables) = aggregate elements from two or more iterables (list, tuples, sets, etc.)
# creates a zip object with paired elements stored in tuples for each element

usernames = ["Dude", "Bro", "Mister"]
login_dates = ["1/1/2021", "1/2/2021", "1/3/2021"]

#
users = list(zip(usernames, passwords))

for i in users:
print(i)

#
users = dict(zip(usernames, passwords))

for key, value in users.items():
print(key+" : "+value)

#
users = zip(usernames, passwords, login_dates)

for i in users:
print(i)

#

BroCodez
Автор

Zip() function is really cool - but hard one to grasp.

UnderArea
Автор

Make a combined full python tutorial. It will help.

rajasthanculture
Автор

Exactly three years ago this video was published and I am watching it now.

AIFutureCast
Автор

always start my day booting up vscode and watching your videos to study

rubenc
Автор

You are like stack overflow but in youtube

khalidahmedibrahim
Автор

I hope youtube algorithm will listen to my prayers, another great tutorial thx !!!

piotrkopcewicz
Автор

i haven´t watched this video yet, but thank you for all the others and this upcoming as well❤

dillydarya
Автор

good video i will now proceed to make a neural network with this new gained information

betafishie
join shbcf.ru