Is there any built in function in Python to split a 32 bit binary number into 4 separate 8 bit binary numbers? I am trying to convert an binary IP address into dotted decimal form and am trying split the numbers up and seem to be at a loss.
example:
Turning this:10000000111111110000001100001111
into: 10000000 11111111 00000011 00001111
So that I can convert into decimal from there. Thanks!
edit: I have been able to split the string into four sections, but now I am trying to convert each of those binary string values into a decimal number. I there a way to define each of the new string sections so I can use the int function on them?