how to print two lists side by side in python

43

# credit to the Stack Overflow user in the source link

a = ['a', 'b', 'c']
b = ['1', '0', '0']
res = "\n".join("{} {}".format(x, y) for x, y in zip(a, b))

Comments

Submit
0 Comments