主页
Python
Python math.trunc() 方法
demo_ref_math_trunc
运行 ❯
×
更改方向
保存代码
更改主题
# Import math Library import math # Return the truncated integer parts of different numbers print(math.trunc(2.77)) print(math.trunc(8.32)) print(math.trunc(-99.29))
2
8
-99