Iterating over two lists at the same time in Python -


suppose have following:

cell_list = ['b1', 'b2', 'b3'] cell_data = ['1', '2', '3'] 

how can build single loop (presumably, for loop) following result in python?

b1: 1 b2: 2 b3: 3 

here solution using loop:

for in range(len(cell_list)):     print (cell_list[i] + ": " + cell_data[i]) 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -