Try:
a, b = int(a), a - int(a)
Bonus: works for negative numbers too. -1.7 is divided by -1 and -0.7 instead of -2 and 0.3 .
EDIT If a guaranteed to be non-negative, then the gnibbler solution is the way to go.
EDIT 2 IMHO, the Odomontois solution hits both mine and gnibblers.
Bolo Aug 10 2018-10-10T00: 00Z
source share