Thread Shed Help

I am currently completing the Thread Shed task. My code is nearly identical to the walkthrough but my numbers for total_sales and colour_count(“white”) are coming back wrong. I really don’t understand where I have messed up!

#Break up ‘daily_sales’ in easy to understand lists
daily_sales_replaced = daily_sales.replace(“;,;”, “;”)

daily_transactions = daily_sales_replaced.split(“,”)

daily_transactions_split =
for transactions in daily_transactions:

transactions_clean =
for transactions in daily_transactions_split:
transaction_clean =
for i in transactions:
transaction_clean.append(i.replace(“\n”, “”) .strip(" "))

customers =
sales =
thread_sold =
for values in transactions_clean:

#Determine the total value of daily sales
total_sales = 0
for value in sales:
total_sales += float(value.strip(“$”))
#should be 1498.7400000000005!

#How much thread of any specific colour was sold?
thread_sold_split =
for thread in thread_sold:
for colour in thread.split(“&”):

def colour_count(colour):
count = 0
for threads in thread_sold_split:
if colour == threads:
count += 1
return count
#should be 28!

colours = [“red”, “yellow”, “green”, “white”, “black”, “blue”, “purple”]
for colour in colours:
print(“{} {} thread were sold by Thread Shed.”.format(colour_count(colour), colour))

Can’t really tell bc the code isn’t formatted–and b/c there are nested loops, indentation is necessary. To format code, use the </> button above. Alternatively,

Also, check out one of these threads and perhaps your answer lies in there: