How can this be solved in python

How can this be solved in python

Take a look at this similar question for more on formatting numbers, especially if youre using a version of Python 3 with f-strings (3.6+).

temp = 36.4158102

print({x:.1f} C.format(x=temp))

# or

print(f{temp:.1f} C)  # 3.6+

How can this be solved in python

Leave a Reply

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