python convert binary / hexadecimal / decimal to binary / hexadecimal / decimal code example
Example 1: python convert binary / hexadecimal / decimal to binary / hexadecimal / decimal
import coden
ans = coden.bin_to_int(number)
ans = coden.bin_to_hex(number)
ans = coden.hex_to_int(number)
ans = coden.hex_to_bin(number)
ans = coden.int_to_bin(number)
ans = coden.int_to_hex(number)
Example 2: convert decimal to hex python
hex(x) being x the integer you want to convert
Example 3: python library to convert decimal into octal and hexadecimal
dec =13
print(bin(dec),oct(dec),hex(dec))