Answers for "zip vs enumerate"

1

enumerate vs zip python same time

alist = ['a1', 'a2', 'a3']
blist = ['b1', 'b2', 'b3']

for i, (a, b) in enumerate(zip(alist, blist)):
    print i, a, b
Posted by: Guest on September-23-2020

Python Answers by Framework

Browse Popular Code Answers by Language