Home >>Python Built-in Functions >Python bin() Function
Python bin() function is used to return the binary version of a given input integer. The resultant value will always start with the prefix 0b.
Syntax:bin(n)
Parameter | Description |
---|---|
n | This is a required parameter. It defines the given input integer. |
x = bin(69) print(x)
x = bin(365) print(x)