number = 13 # ✓ format number as binary (in base 2) string = f'{number:b}' print(string) # 👉️ 1101 # ✓ Convert an integer to a binary string prefixed ...
確定! 回上一頁