n1 = 255 n2 = 1000 def int2str(self): return hex(self) print('n1转换成十六进制的字符串为:%s\nn2转换成十六进制的字符串为:%s' % (int2str(n1),int2str(n2)))
very good!
What a perfect answer!
The best.
Sign in to make a reply
LeborYi