SyntaxFix
Write A Post
Hire A Developer
Questions
>>> "{:.1f}".format(45.34531) '45.3'
Or use the builtin round:
>>> round(45.34531, 1) 45.299999999999997