I am using Python.
How to do the addition of the strings $61.52 and $57.74 get the value as 119.26?
I tried using isdigit() but it is extracting numbers as 6152 and not as 61.52. I want to extract 61.52 from string $61.52.
>Solution :
What I would do:
amount1 = float('$61.52'.replace('$', ''))
amount2 = float('$57.74'.replace('$', ''))
result = amount1 + amount2
print(f'The sum is: ${result:.2f}')