La méthode bin() convertit un nombre entier spécifié en sa représentation binaire et le renvoie.
Exemple
|
1 2 3 4 5 |
number = 7 # convert 7 to its binary equivalent print('The binary equivalent of 7 is:', bin(number)) # The output is: The binary equivalent of 7 is: 0b111 |
Younes Derfoufi
CRMEF OUJDA

![[App intégrée] 2025 Upgraded Vidéoprojecteur 1920 * 1080P FHD 4K Mini Projecteur Portable Dual Contrôle avec Souris Android TV WiFi 6 BT5.2 180° Rotation Compatible avec HDMI/TV Stick/USB](https://www.tresfacile.net/wp-content/uploads/2025/12/Videoprojecteur-1920-1080P-FHD-4K-Mini-Projecteur-Portable-Dual-Control-250x236.png)

1 thought on “La fonction bin() Python”