The Thread Shed Help

Hello, I have followed the help video for this project the output in terminal is just a sequence of single letters and spaces from each list. Example:

’ ', ‘$’, ‘2’, ‘2’, ‘.’, ‘6’, ‘6’, ’ ', ’ ', ’ ', ‘+’, ’ ‘, ‘g’, ‘r’, ‘e’, ‘e’, ‘n’, ‘&’, ‘w’, ‘h’, ‘i’, ‘t’, ‘e’, ‘&’, ‘b’, ‘l’, ‘u’, ‘e’, ‘+’, ‘0’, ‘9’, ‘/’, ‘1’, ‘5’, ‘/’, ‘1’, ‘7’], [’ ', ‘M’, ‘y’, ‘r’, ‘t’, ‘l’, ‘e’, ’ ', ‘M’, ‘o’, ‘r’, ‘r’, ‘i’, ‘s’, ’ ', ‘\n’, ‘+’, ’ ', ’ ', ’ ', ‘$’, ‘2’, ‘2’, ‘.’, ‘6’, ‘6’, ’ ', ’ ', ’ ', ‘+’, ’ ', ‘g’, ‘r’, ‘e’, ‘e’, ‘n’, ‘&’, ‘w’, ‘h’, ‘i’, ‘t’, ‘e’, ‘&’, ‘b’, ‘l’, ‘u’, ‘e’, ‘+’

Not sure what in my code is causing this, I’ve tried troubleshooting for over an hour and yet I still can’t find the problem.
Here is my code:

daily_transactions = daily_sales_replaced.split(",")
print(daily_sales_replaced)

daily_transactions_split = []
for transaction in daily_transactions:
  daily_transactions_split.append(transaction.split("+"))

transactions_clean = []
for transactions in daily_transactions_split:
  transaction_clean = []
  for data_point in transaction:
    transaction_clean.append(data_point.strip(""))
    transactions_clean.append(transaction_clean)

print(transactions_clean)

  • The step above your first line of code, does it look something like this?
    daily_sales_replaced = daily_sales.replace(';,;', '+')

  • Double check the indentation on your 2nd for loop (transactions_clean.append(transaction_clean)

The way you have it written, your code is cleaning, appending and appending again which gives duplicates.

Also, have a look around here in the forums. There are lots of ppl who have run into similar errors:
https://discuss.codecademy.com/search?q=thread%20shed

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.