python different binary conversion function

In the Python language, we used to binary, octal, decimal and hexadecimal, today, speaking about various hexadecimal representation. (Upper or lower case letters)

Binary: begin with 0b, 2 and 2 above figures do not appear. (In this analogy)

Octal: to 0o beginning.

Decimal: start with a number, the most commonly used.

Hex: to begin with 0x

Conversion between hexadecimal:

bin (x): Other binary transfer binary.

oct (x): Other octal binary transfer.

int (x): Other binary decimal turn.

oct (x): Other hexadecimal convert hexadecimal.

Guess you like

Origin www.cnblogs.com/xbzc/p/12483433.html