There is such a construction
return 'Current price:' + str (resBTC_obj ['token'] ['last']) + 'per 1 token '
Which returns the price, but it returns the price in exopential form, how to get rid of this?
Answer 1, authority 100%
Try this, where .2f
is 2 decimal places:
'Current price:' + '{: .2f}'. format (resBTC_obj ['token'] [' last ']) +' per 1 token '