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
Post a Comment