Why is my code wrong?

I continuously get this message in the console with my code. Am I doing something wrong?
This is for question 11, the project ‘Thread Shed’ in ‘Strings’, Python 3 Pro.

It looks to me like you are assuming transaction is a list but at least one is actually a string, in fact it is a string that is less than 3 characters long (hence index 2 being out of range). Which would seemingly mean however you make transactions_clean is wrong as it has a string in it or transactions_clean does not contain lists. I haven’t looked at the question or lesson so not sure what you should be expecting etc so my assumptions could be wrong.

Either way your issue is that at least one element in transactions_clean is a string and that string does not have an index of 2, i.e. is it only 2 characters long.

Thanks! I’ll check to see if you are right.