Python bin() function
Python bin() function
The bin() function in Python returns the binary version for the specified integer.
Syntax
bin(x)
Parameter
n: This parameter represents an integer or int value.
Return
This function returns a binary string for the specified integer or int object.
Example 1
# Python Program explaining # bin() built-in function x = bin(136) print('The bin() function returns: ',x)
Output
The bin() function returns: 0b10001000