tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code04:50

Python zip function 🤐

Bro Code ↗

From the creator

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"] passwords = ("p@ssword", "abc123", "guest") 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) # --------------------------------------

Published 2021-01-25 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code