print up to 1 decimal point in python code example
Example 1: python format only 1 decimal place
>>> "{0:0.1f}".format(45.34531)
'45.3'
Example 2: print upto 1 decimal place python
print("{:.1f}".format(number)) # Python3
print "%.1f" % number # Python2