Discuss / Python / 交作业

交作业

Topic source

print(hex(n1))

print(hex(n2))

str(print(hex(n1)))

str(print(hex(n2)))

# 忘记转换成字符串类型了,补上。

黎晓缘梦

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

hex()本身的作用不就是把整数转成十六进制表示的字符串了吗?为什么还要用str()?

我也不知道

我用type查的显示NoneType

所以才加了str转换


  • 1

Reply