I have a list, and I want to repeat its elements in the same order.
I want to create bg
using sl
.
# small list
sl = [10,20]
# from small list, create a big list
bg = [10,10,20,20]
I tried:
bg = [[i,j] in for i,j in zip([[sl[0]]*2,[sl[1]]*2])]
But this gives me:
bg = [[10,20],[10,20]]
How can I get the desired output?