We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
进制之间的转换
# 十进制转换为二进制 print(bin(120)) # 将二进制转为十进制 print(int('0B10110',2)) print(int('10110',2)) # 十六进制转十进制 print(int('0XF35AE',16)) print(int('F35AE',16)) # 十进制转为十六进制 print(hex(54321)) # 十六进制转换为二进制 print(bin(0xF012A)) # 将二进制转换为十六进制 print(hex(0b1101110101)) # 十进制转为八进制 print(oct(1234)) # 将八进制转为十进制 print(int('3213',8)) # 输出仍然是十进制 print(0b11010101 * 0XF12 * 0o432 * 123)
The text was updated successfully, but these errors were encountered:
#8
Sorry, something went wrong.
No branches or pull requests
进制之间的转换
The text was updated successfully, but these errors were encountered: