Python: To Binary String

# Help on built-in function bin in module builtins:

bin(number, /)
    Return the binary representation of an integer.
    
    >>> bin(2796202)
    '0b1010101010101010101010'
>>> bin(21)
'0b10101'

Leave a Comment

Your email address will not be published.

3 × 5 =