check if number is decimal python code example
Example 1: w=how to tell if decimal in python
i = 100
f = 1.23
print(type(i))
print(type(f))
# <class 'int'>
# <class 'float'>
Example 2: check number of digits after decimal python
from math import floor
float_num = 7456.4597
float_decimal = float_num - floor(float_num)