I would like to change 1762 milliseconds to seconds 1.762. I have tried the below method, it gives me seconds in single-digit when i need seconds as mentioned above (i.e "1.762").
seconds=(rcccc/1000)%60
sec = int(seconds)
Out of the many ways to address this, one way would be to specify that one of the operands is a float.
>>> 1762 / 1000 # Both integers
1
>>> 1762 / 1000.0 # One float
1.762
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