공부
[Python] binary string to int
승가비
2020. 6. 26. 01:04
728x90
>>> int('11111111', 2)
255
https://stackoverflow.com/questions/8928240/convert-base-2-binary-number-string-to-int
Convert base-2 binary number string to int
I'd simply like to convert a base-2 binary number string into an int, something like this: >>> '11111111'.fromBinaryToInt() 255 Is there a way to do this in Python?
stackoverflow.com
728x90