I have a list A = [100011, 1110110]. I want to make each entry in the list 8 bit using the format option:
B = '{0:08b}'.format(A[1])
B = '{0:08b}'.format(A[2])
But when I print(B). I am getting the output as: B = 100001111000001011110 and B = 11000011010101011
Why is this happening? Is this command not used for list?