try using
list(bytestring)
Eg.
>>> bstring=b"Hello World"
>>> list( bstring)
[72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]
>>>
If you want one huge bitfield instead of all those octets
>>> from functools import reduce
>>> reduce(lambda x,y:(x<<8)+y,list(b"Hello World"))
87521618088882533792115812
>>> bin(_)
'0b100100001100101011011000110110001101111001000000101011101101111011100100110110001100100'
>>>
You didn't say how you are counting the bits, perhaps they are supposed to be reversed
>>> reduce(lambda x,y:(x<<8)+y,list(b"Hello World"[::-1]))
121404708493354166158910792
>>> bits=bin(_)[2:]
and pad the string to even bytes
>>> bits=bits.zfill(((len(bits)-1)//8+1)*8)
>>> bits
'0110010001101100011100100110111101010111001000000110111101101100011011000110010101001000'
turn the first 6 bits into an int
>>> int(bits[:6],2)
25
and then the following 4 bits
>>> int(bits[6:10],2)
1