Horje
drop-trailing-zeros-from-decimal python Code Example
drop-trailing-zeros-from-decimal python
>>> s = str(Decimal('1500'))
>>> print s.rstrip('0').rstrip('.') if '.' in s else s
1500




Python

Related
loop through list of tuples python Code Example loop through list of tuples python Code Example
sort dictionary by values Code Example sort dictionary by values Code Example
how to sort a list descending python Code Example how to sort a list descending python Code Example
python3 ngrok.py Code Example python3 ngrok.py Code Example
timedelta Code Example timedelta Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7