So if I run:
a = b / c
and get the result 1.2234
1.2234
How do i separate it so that I have:
a = 1 b = 0.2234
>>> from math import modf >>> b,a = modf(1.2234) >>> print ('a = %f and b = %f'%(a,b)) a = 1.000000 and b = 0.223400 >>> b,a = modf(-1.2234) >>> print ('a = %f and b = %f'%(a,b)) a = -1.000000 and b = -0.223400
1.4m articles
1.4m replys
5 comments
57.0k users