Python 3 built-in functions split(), strip(), replace(), thread shed quiz

https://www.codecademy.com/courses/learn-python-3/projects/thread-shed

I am stuck at the python 3 thread shed quiz (above link) for 2 days.
Anyone have the answers? I was stuck at step 11. My output is in the picture below. Whereby each name, , colour, date is 1 transaction. I am suppose to group all the names, , colour into separately into 3 different list. How do I continue from here?
Pls help me! Thanks in advance.

I’m currently going through this task as well. From my understanding of the instructions in step 11 it is telling us to create a loop that will deposit the information into the list we were instructed to create in step 10.
The way I approached this, was first looking at how the information is set up. If you look at the list we start with, the information is placed in a particular pattern (name, money, color, date). Knowing that, I picked a starting point for my loop using the index of the first instance of the information I wanted.
So for example, I know index zero is the first instance of a customers name, and it’s repeated every fourth item.
Using that information I had my loop append every fourth item starting at index zero to the list “customers”.
Does that help you?

Hi dickykitchenjr, thanks for your reply.

I tried iterating through each item using range. But there is a TypeError

for i in transactions_clean:

customers.append(transactions_clean[range(0, -1, 4)])

print(customers)

however, there is an error. Do you know to clear this error?

customers.append(transactions_clean[range(0, -1, 4)])
TypeError: list indices must be integers or slices, not range

I’m just getting this truly correct today. And it looks like we both made similar mistakes. Big thanks to @mtf for teaching me this part. Hopefully he’ll jump in and correct me if I tell you anything wrong.

The correct way to do it would be:
for i in transactions_clean:
customers.append(i[0])
print(customers)

Basically this iterates through each list pulling the zero index spot (in this case the customer) and adds it to the customers list.
I messed up the first time by trying to append from transactions_clean. But i is what you (and I) should have appended from.
That should fix the error.

When I do so, I got the first letter of every word :joy: :joy:

It look likes you’ve most likely made an error further up the chain. Have you checked to make sure everything has come out properly after each step?
Thread Shed is tough because of the length of the list. It makes it easier to miss something when it doesn’t print out like you expect.
Here’s my code up to step 18. Maybe comparing our two codes will help you.