I have a list of lists containing 32 individual bits. I want to separate these values into 4 strings of binary digits, each representing a byte.
My data looks like:
array = [[1, 0, 0, 0, 1, 0, 1, 0],
[0, 1, 1, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 1, 0, 0, 0],
[0, 0, 1, 1, 1, 0, 1, 1]]
The result should satisfy
array[0] == '10001010'
array[1] == '01100000'
array[2] == '00001000'
array[3] == '00111011'
Every solution I've tried leaves me with a string containing commas, such as '1,0,0,0,1,0,1,0'
.
What is the simplest way to take each of these byte groupings and convert them into a string?