I have learned various base expressions when learning C language before. Python also has base expressions like C language. So how to use them? Let’s find out together below.
The binary number in Python starts with 0b:
For example: 0b11 means decimal 3
1 |
|
The octal number starts with Starting with 0:
For example: 011 means 9 in decimal system
1 |
|
16 starts with 0x:
For example: 0x11 means 17## in decimal system #
1 |
|
The above is the detailed content of How does python represent octal?. For more information, please follow other related articles on the PHP Chinese website!