PyDocs

Nav

Python Runtime Services

bin

builtins

function
  • bin(integer, /)
Return the binary representation of an integer.

>>> bin(2796202)
'0b1010101010101010101010'
1 Example
>>> bin(3)
'0b11'
>>> bin(-10)
'-0b1010'
from the Python docs
See Also
No see-alsos for builtins/bin
0 Notes
No notes for bin