Why for loop is not running parallel ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why for loop is not running parallel ?

x=[1,2,3,4,5,6,7,8,9,10] def add(data,col_range): for col in sheet[col_range]: for item,cell in zip(data,col): print(f"{item}) {cell}") print("item executed....") add(x,'A2:A11') I am reading an excel file data! in this code I want to print one item from list x and one cell but only first item is printing each time what to do please help.. see my code for better understanding.. Expected output : 1) <Cell 'Template'.A2> 2) <Cell 'Template'.A3> 3) <Cell 'Template'.A4> 4) <Cell 'Template'.A5> 5) <Cell 'Template'.A6> 6) <Cell 'Template'.A7> 7) <Cell 'Template'.A8> 8) <Cell 'Template'.A9> 9) <Cell 'Template'.A10> 10) <Cell 'Template'.A11> I don't want to use enumerate() actually x contain another data not index numbers! https://code.sololearn.com/cC9ZTi2osnCG/?ref=app

31st Dec 2021, 10:32 AM
Ratnapal Shende
Ratnapal Shende - avatar
1 Answer
0
C-MOON Thank you so much!
31st Dec 2021, 12:14 PM
Ratnapal Shende
Ratnapal Shende - avatar