Discuss / Python / 微笑的高圆圆

微笑的高圆圆

Topic source

int()函数的作用:

1.将符合格式的字符串转换为整数。

2. 将浮点数转换为整数,只是简单的取整,并非四舍五入。

如: int("589") == 589

         int(4.56) == 4


  • 1

Reply