# -*- coding: utf-8 -*- #请利用Python内置的hex()函数把一个整数转换成十六进制表示的字符串: n1 = 255 n2 = 1000 a = hex(n1) b = hex(n2) print('%s translate hex: %s, %s translate hex: %s' % (n1, a, n2, b))
Sign in to make a reply
Sayiod