Python bin() function

The bin() function in Python returns the binary version for the specified integer.

Syntax

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

Output

Pin It on Pinterest

Share This