I have a program that is a converter for times in minutes and seconds and returns a float value with a decimal, for example:
6.57312
I would like to extract the .57312
part in order to convert it to seconds.
How can I get python to take only the value after the decimal point and put it into a variable that I can then use for the conversion?
You can do just a simple operation
dec = 6.57312 % 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With