Home >Backend Development >Python Tutorial >How does python represent octal?
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
>>>0b11
The octal number starts with Starting with 0:
For example: 011 means 9 in decimal system
>>>0o11 //这里是英文字母o
16 starts with 0x:
For example: 0x11 means 17## in decimal system #
>>>0x11
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!