python快速取整及取小数部分 可以自己写个简单函数,也可以使用math模块下的modf函数 import math a,b=math.modf(32.005) print a,b a=0.005000000000002558 b=32.0 *****注意a,b都是浮点型 Post Views: 538