#这个实现过程好长啊,有空再看看怎么简化。

n1=255
n2=1000
c1=hex(n1)
c2=hex(n2)
b1=str(c1)
b2=str(c2)
print(hex(n1),hex(n2)) #整数类型
print(b1,b2) #字符串类型
print(type (b1) ) #检查类型

posted on 2021-07-09 17:41  gurgles  阅读(267)  评论(0)    收藏  举报