Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # zip_parallel_iterate.py
- aaa = [10,20,30,40,50]
- bbb = 'a b c d e'.split()
- for a, b in zip(aaa, bbb): # zip stops when the shorter of any list stops
- print(a, b)
- #
- print
- ccc = 'xyz abc python happy 123 Wow!'.split()
- for a, b, c in zip(aaa, bbb, ccc):
- print(a, b, c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement