11 Jan

Python: round float while logging

# python

>>> x = 3.1415926
>>> format(x, '.2f')
'3.14'


Leave a Reply

Your email address will not be published. Required fields are marked *