最后一个构造函数也采用了字符串“100”——但是它使用基数8来创建整数值,通常称为八进制。
And the final constructor takes the string of characters "100" — but this time creates an integer using base 8, which is more commonly known as base octal.
您可以将输出显示为八进制、十六进制、十进制、浮点数、包含反斜杠转义符的ASCII,或者指定的字符(nl表示换行、ht表示水平制表符,等等)。
You can display output as octal, hex, decimal, floating point, ASCII with backslash escapes, or named characters (nl for newline, ht for horizontal TAB, etc.).
Python支持不同进制的整型字符串文本—八进制、十进制(最明显的!)
Python supports string literals of integers of different bases-octal, decimal (obviously!), and hexadecimal-and now binary has been added.
应用推荐