Base Tools-Seventeenth:Python hex() 函数

发布时间:2026/5/24 6:49:56

Base Tools-Seventeenth:Python hex() 函数 目录描述语法参数返回值实例描述将10进制整数转换成16进制以字符串形式表示语法hex(x)参数x-- 10进制整数返回值16进制数以字符串形式表示实例print(hex(255)) print(hex(-42)) print(hex(1)) print(hex(12)) print(type(hex(12)))# 字符串python 3.13不支持尾缀内容借鉴于菜鸟教程感谢Python hex() 函数 | 菜鸟教程https://www.runoob.com/python/python-func-hex.html

相关新闻