I don’t know what I’m doing wrong for this project but I I follow the video and my output still does not match the output code he gets and I been on it for three days now. I attached a screen shot of my code and output.

The hint in the exercise tells you the proper way to do it. Your issue stems from this line:

transaction_clean.append(data_point.replace("\n", " ").split())

As you can see in the Python docs, the str.split() method not only splits a string, but returns the split string as a list.


Okay I figured that out was using split when I should have used strip() but another question is why do my code repeat

And thank you for for responding

1 Like

If you check your code quickly you only have one print statement. It prints transactions_clean and it is not reapeated by any loop. So you can work out what variable is causing issues.
When you are appending items to this list, what are you are appending?

If it’s not come to you after a few minutes then-

Hint: take a close look at line 122

1 Like

I’m trying to figure it out but I’m just not getting understanding even when i use the hint you provide to me

Hold on need to actually check those variables carefully, one min-
Sorry that took a wee while. Confused myself for a bit and had to actually type this out. I made a mistake myself in the first glance over your code but it’s still the same line with the issue anyway. In the future you can use a triple (` ` ` ) mark on a line above and a line below your text to highlight it as code which is a little easier to check than screenshots.

There’s a hint of the issue in your print statement in that your values repeat four times. It’s not coincidence that each transaction has four items of data.
Which line in your code appends items to transactions_clean and what loop surrounds it.


Thank you so much it took me awhile to figure out what you was saying but i had append for transaction_clean inside the wrong for-loop