hex oct ord 函数
-
hex()
十六进制转十进制函数
-
oct()
八进制转十进制函数
-
ord
返回ascii字符数值
-
示例
hex/oct处理对象需要用单引号或双引号包围
print hex("0xff")," "; print hex(0xff)," "; #incorrect result print oct("055")," "; print oct(055)," "; #incorrect result print ord("a")," "; print ord(a)," ";