Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Float decimals

for d in '$50.99', '$50.00', '49.99':   
    print(float(f"{float(d.removeprefix('$')):.2f}"[:-1]))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Float #decimals
ADD COMMENT
Topic
Name
3+9 =