How to print two lists items simultaneously in Python

1 Answer

0 votes
list1 = ['aaa', 'bbb', 'ccc', 'ddd', 'eee', 'fff'] 
list2 = [5, 7, 1, 0, 3, 7] 
  
for l1, l2 in zip(list1, list2): 
    print (l1, l2)



'''
run:

aaa 5
bbb 7
ccc 1
ddd 0
eee 3
fff 7

'''

 



answered Apr 10, 2019 by avibootz

Related questions

...