python 取整

向上取整:

  math.ceil()

向下取整:

  int()

四舍五入:

  round()

分别取整数部分和小数部分:

  math.modf()
posted @ 2021-04-28 17:26  轩辕吊雷  阅读(176)  评论(0)    收藏  举报