Answers for "python merge two lists alternating"

0

python merge two lists alternating

a = [1, 3, 5]
b = [2, 4, 6]

c = []
for x, y in zip(a, b):
  c += [x, y]

print(c)
# [1, 2, 3, 4, 5, 6]
Posted by: Guest on March-13-2021

Code answers related to "python merge two lists alternating"

Python Answers by Framework

Browse Popular Code Answers by Language