How to loop two lists in python
How to loop two lists in python? materialLst= (A, B, X)
priceLst = (55, 12, 23)
for (m, p) in some_iterator(materialLst, priceLst):
print("m: ", m, "; p: ", p)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajanikant HawaldarPosted Dec 25, 2020, 9:26 AM
Sagar LadPosted Aug 19, 2021, 2:33 PM
Hi Ayush,
You can also use zip function :