1, 请利用Python内置的hex()函数把一个整数转换成十六进制表示的字符串:
hex()
n1 = 255
n2 = 1000
print(???)
答案:
n1 = 255n2 = 1000print(str(hex(n1))+'\n'+str(hex(n2)))
print((hex(n1)),(hex(n2)))