I created a list like this:
a=list('Testing 123')[::2]
b=list('Testing 123')[1::2]
So how do I make a make a new list which adds them like they originally were?
I created a list like this:
a=list('Testing 123')[::2]
b=list('Testing 123')[1::2]
So how do I make a make a new list which adds them like they originally were?
Here's one way to do it:
>>> a, b
(['T', 's', 'i', 'g', '1', '3'], ['e', 't', 'n', ' ', '2'])
>>> c = [None]*(len(a)+len(b))
>>> c[::2], c[1::2] = a, b
>>> ''.join(c)
'Testing 123'