I am just facing one tricky challenge to make a list combination in python 3.
I have one list that needs to used for combination. (given list)
['01101001', '01110110', '01100101', '01101011']
I want to get the list combined with each value like below. (result list)
['00001111', '11110100', '10010110', '01011011']
The first item in the result list is made by the combination of the first 4 strings and the second 4 strings of each item in turn in the given list.
So 0000
are the first 4 strings of each item and 1111
are the second 4 strings of each item in the given list.
Thus the first item of the result list is 00001111
.
What is the optimized code written by Python 3? Thank you in advance!