0
A= " % . 2f " %(5.856)
Above code returns 5.85 as a string but I can't able to convert it into integer why
1 Answer
+ 2
Try this:
# Output: 5
print(" %.0d " %(5.856))
# Output: 6
print(" %.0f " %(5.856))
Above code returns 5.85 as a string but I can't able to convert it into integer why