I have two lists, x and y:
x
y
>>> x = [2, 3, 4] >>> y = [1, 2, 3]
I want to use these to create a
Simple using for loop.
for
>>> x = [2, 3, 4] >>> y = [1, 2, 3] >>> final = [] >>> for index, item in enumerate(y): final.extend([x[index]]*item)