Hi there ive tried for days now to solve why the computer is printing each list element multiple times.
Ive followed the tutorial video and copied the code exactly how the code is, in the tutorial video and it doesn’t work. It prints a totally different result than what is shown on the tutorial. i’ve tried dissecting the for loop and it just seems to have a mind of its own…
if it doesn’t print each element multiple times, it will print the list with many extra brackets or with no brackets… which doesnt look like how it should look in the tutorial video.
I would love to find the solution to this, my code is below:
daily_sales_replaced = daily_sales.replace(";,;", "+") daily_transactions = daily_sales_replaced.split(",") daily_transactions_split =  for transaction in daily_transactions: daily_transactions_split.append(transaction.split("+")) transactions_clean =  for transaction in daily_transactions_split: transaction_clean =  for data_point in transaction: transaction_clean.append(data_point.strip(" ")) transactions_clean.append(transaction_clean) print(transactions_clean)
[['Edith Mcbride', '$1.21', 'white', '\n09/15/17'], ['Edith Mcbride', '$1.21', 'white', '\n09/15/17'], ['Edith Mcbride', '$1.21', 'white', '\n09/15/17'], ['Edith Mcbride', '$1.21', 'white', '\n09/15/17'], ['Herbert Tran', '$7.29', '\nwhite&blue', '09/15/17']
i dont know how clear it is in the question but everything has been indented properly im sure of it as ive tried everything, the for loop starts at line: “for transaction in daily_transactions_split”
please help! thank you