I am trying to convert a binary value to a list with each 1/0 but I get the default binary value and not the list.
I have a string, I convert each character in binary and it gives me an list with a string for each character. Now I am trying to split each string into ints with the value 0/1 but I can't get anything.
# if message = "CC"
message="CC"
# just a debug thing
for c in message:
asci = ord(c)
bin = int("{0:b}".format(asci))
print >> sys.stderr, "For %c, asci is %d and bin is %d" %(c,asci,bin)
c = ["{0:b}".format(ord(c)) for c in message]
# c = ['1000011', '1000011']
bin = [int(c) for c in c]
#bin should be [1,0,0,0,0,1,1,1,0,0,0,0,1,1]
# but I get [1000011, 1000011]
print >> sys.stderr, bin