Answers for "use enumerate and zip"

10

enumerate zip python

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 March-18-2020
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