There are certain parts of this project that are not making sense. For instance, in this step, I am converting numbers to float. But I don’t understand what I am doing wrong. I checked my code and its correct and I don’t know what else to do. here is my code for step 13:
total_sales = 0
for sale in sales:
total_sales += float(sale.strip("$"))
print(total_sales)
and this is what I get:
Traceback (most recent call last):
File "script.py", line 141, in <module>
total_sales += float(sale.strip("$"))
ValueError: could not convert string to float: '\n$17.98'