Python‎ > ‎Built-in‎ > ‎

bin()

http://www.adilwaseem.com/

Introduction
Return the binary representation of an integer.

Syntax
bin(x) -> string

Parameters
x=number

Examples
The convert the value:
 >>> 
>>> bin(49)
'0b110001'

The method returns with:
 >>> bin(44)
'0b101100'

The method returns the value of the bin(1).
 >>> bin(1)
'0b1'

Comments