Python Decimal to String
Use the string format function:
>>> from decimal import Decimal
>>> d = Decimal("0.0000000000000123123")
>>> s = '{0:f}'.format(d)
>>> print(s)
0.0000000000000123123
If you just type cast the number to a string it won't work for exponents:
>>> str(d)
'1.23123E-14'
Use the str()
builtin, which:
Returns a string containing a nicely printable representation of an object.
E.g:
>>> import decimal
>>> dec = decimal.Decimal('10.0')
>>> str(dec)
'10.0'