Python Thread Shed Step 8

On step 8 where I clean out the white space and gibberish. The transactions_clean list end ups with each entry 4 times in a row. The duplicate entries get added when I go through this loop and are not present in the loops I setup in steps 1-7. Those are working fine.

Even after changing my loop to be the same as the one in the Youtube video I still run into this problem. This is loop:

transactions_clean =
for transaction in daily_transactions_split:
transaction_clean =
for data_point in transaction:
transaction_clean.append(data_point.replace(ā€œ\nā€,ā€œā€).strip(" "))


Going forward, please format your code.
And please follow these guidelines before posting.

Check your indentation in your loops.

You might want to peruse this very topic here as this question has been posted several times and you will find a hint towards a solution: