1. Hexadecimal to decimal:

>>> int('0xf',16) 
15

2. Binary to decimal:

>>> int('10100111110',2)      
1342

3. Octonary to decimal:

>>> int('17',8)    
15

4. Decimal to hexadecimal:

>>> hex(1033)
'0x409'

5. Binary to hexadecimal:

>>> hex(int('101010',2))
'0x2a'

6. Octonary to hexadecimal:

>>> hex(int('17',8))
'0xf'

7. Decimal to binary:

>>> bin(10)
'0b1010'

8. Hexadecimal to binary:

>>> bin(int('ff',16))
'0b11111111'

9. Octonary to binary:

>>> bin(int('17',8))
'0b1111'

10. Binary to octonary:

>>> oct(0b1010)        
'012'

11. Decimal to octonary:

>>> oct(11)
'013

12. Hexadecimal to octonary:

>>> oct(0xf) 
'017'