you could do this:
sample = 9.283646283
print(len(str(sample).split(".")[1]))
str(sample) will convert the float to string
.split(".")[1] will split by the dot and return the decimals
len() will give you the lenght of the decimals-substring
result: 9