This question is regarding:
https://www.codecademy.com/courses/learn-python-3/projects/thread-shed
I thought I had everything going ok, then I noticed that I somehow managed to take a list starting with a length of 100 and turn in into 400, and then created 3 separate list of 400 each. I have no idea where I went wrong.
I’m only posting my code vs posting the strings from the exercise because its a very long list, but the starting strings can be found in the project link or I can post the whole thing if its requested.
Thanks for helping me figure out how my list got out of hand…
daily_sales_replaced = daily_sales.replace(";,;", “:”)
daily_transactions = daily_sales_replaced.split(",")
print(len(daily_transactions))
daily_transactions_split =
for x in daily_transactions:
y = x.split(":")
daily_transactions_split.append(y)
print(len(daily_transactions_split))
transactions_clean =
for x in daily_transactions_split:
for y in x:
z = y.strip()
transactions_clean.append(y)
print(len(transactions_clean))
customers =
sales =
thread_sold =
for x in transactions_clean:
customers.append(transactions_clean[0::4])
sales.append(transactions_clean[1::4])
thread_sold.append(transactions_clean[2::4])
print(len(customers))
print(len(sales))
print(len(thread_sold))