随笔记

hex()函数把一个整数转换成十六进制表示的字符串:

n1 = 255

n2 = 1000

print(hex(n1),hex(n2))

0xff 0x3e8

 

原文地址:https://www.cnblogs.com/xuli503/p/13072654.html