I have the following list of strings:
l1 = ['one','two','three']
I want to obtain a list that has, say, these same elements repeated n
times. If n=3
I'd get:
l2 = ['one','one','one','two','two','two','three','three','three']
What I am trying is this:
l2 = [3*i for i in l1]
But what I obtain is this:
l2 = ['oneoneone','twotwotwo','threethreethree']
If I try this:
l2 = [3*(str(i)+",") for i in l1]
I obtain:
l2 = ['one,one,one','two,two,two','three,three,three']
What am I missing?