首页 > 技术文章 > python 中的 int() 与 round
wbyixx 2019-11-25 22:04 原文
FLowUs邀请链接:https://flowus.cn/login?code=AXNU63 FlowUs邀请码:AXNU63
int(x):向下取整
int(x)
round(x):超过 .5 则向上取整,否则向下取整
round(x)
.5