Python 3.4 - Zip

The zip function takes two lists and puts them together. It will create positions for the items in the list:

List = ['matt', 'tom', 'taylor']
List2 = ['han', 'leia', 'luke']

names = zip(List, List2)

for a, b in names:
    print(a, b)


https://www.youtube.com/watch?v=cTXHmOt7Rwc

Comments

Popular posts from this blog

Pyhton 3.4 - Continue

Conversations Ongoing: Valuing Modernization in Early European History

Conversations Ongoing: A Bunch of Amateurs