十六进制

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#author:wq  2016-4-13
n1 = 255
n2 = 1000
x = hex(255)
y = hex(1000)

print(x)
print(y)
print(hex(n1),hex(n2))
[root@CentOS7 script]# python hex.py
0xff
0x3e8
0xff 0x3e8

 

posted on 2016-04-13 10:56  奔跑的东东  阅读(187)  评论(0编辑  收藏  举报