In the 8th step of the project Thead Shed I wrote the Following code:
transactions_clean =  for transaction in daily_transactions_split: for datapoint in transaction: transactions_clean.append(datapoint.replace("\n", "").strip(" "))
I was wondering why my code is wrong and why do we need to create a list in the loop and use that list to append the clean datapoints and than append that list to the final list namely transactions_split.
Why Cant we directly append to that list in the first place and not define the list inside the loop.
Any Help would be greatly appreciated.