Discuss / Python / zuoye

zuoye

Topic source

SRY__

#1 Created at ... [Delete] [Delete and Lock User]

请利用Python内置的hex()函数把一个整数转换成十六进制表示的字符串:

-- coding: utf-8 --

n1 = 255 n2 = 1000

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


  • 1

Reply