2 Hex: 0B
. 8 hex: 0o
16 hex: 0x
10 hex: original data
Base conversion:
bin () method: conversion of binary
>>> bin (10)
'0b1010'
OCT () method: conversion of octal
>>> OCT (10)
'0o12'
int () Method: Conversion in decimal
>>> int (0o12)
10
hex () method: conversion of hexadecimal
>>> hex (0o12)
'0xA'