examples:
0.28 --> 2
0.1234 --> 4
0.01345000 --> 5
My answer:
len(str(k)[str(k).index('.')+1:])
It works but it is also super ugly. Anything more pythonic?
examples:
0.28 --> 2
0.1234 --> 4
0.01345000 --> 5
My answer:
len(str(k)[str(k).index('.')+1:])
It works but it is also super ugly. Anything more pythonic?