In a variable is stored this value: $10.00
And I need to get this 10.00
I've tried to convert this value to float:
new_price = '%.2f' % (price.to_f)
but I get just 0.0.
What's wrong with that? I've tried also
price = price.strip
price[0]=""
new_price = '%.2f' % (price.to_f)
But even this didn't help me... where is a problem?
Thanks