What am I doing wrong in thread shed?

daily_sales_replaced = daily_sales.replace(“;,;”, “@”)
daily_transactions = daily_sales_replaced.split(“,”)

daily_transactions_split =

for transaction in daily_transactions:
daily_transactions_split.append(transaction.split(“@”))

transactions_clean =

for transaction in daily_transactions_split:
transaction_clean =
for data_point in transaction:
transaction_clean.append(data_point.strip())
transactions_clean.append(transaction_clean)

customers =
sales =
thread_sold =

for transaction in transactions_clean:
customers.append(transaction[0])
sales.append(transaction[1])
thread_sold.append(transaction[2])

total_sales = 0

for sale in sales:
total_sales += float(sale.strip(“$”))

threads_sold_split =

for thread in thread_sold:
if “&” in thread:
thread.split(“&”)
threads_sold_split.append(thread)
else:
threads_sold_split.append(thread)

def color_count(color):
color_total = 0
for thread_color in threads_sold_split:
if color == thread_color:
color_total += 1
return color_total

colors = [“red”,“yellow”,“green”,“white”,“black”,“blue”,“purple”]

for color in colors:
print(“Thread Shed sold {} threads of {} thread today.”.format(color_count(color), color))

Please format your code.

Also, check the forums for previous posts/answers first.

See: