Python bin() Function
Returns the binary version of a number
Syntax
Python
Copy Code
bin(number)
Parameters
Parameter | Description |
---|---|
number |
Required. The string value to search for within the given string |
Example
Python
Copy Code
print('15 in binary: ' + bin(15))
Output
15 in binary: 0b1111