Inspired Python◆◆◆>>> int('0b0101011', base=2) 43 >>> int('0xFF', base=16) 255 >>> bin(43) '0b101011' >>> hex(255) '0xff'