[Python Project: Thread Shed] (Namespace Conflict)

My Thread Shed Code

Line 167 of my linked code, should return 28 according to the solution video. However, I am getting 112. I believe there may be namespace conflicts with the loops provided in the solution video.

Could the use of color as a variable in the previous loops be causing it to count color multiple times?

I came across a similar namespace conflict on line 138 where the t variable was originally transaction. This caused the sales list to have its values surrounded by additional spaces.

Python Project Thread Shed

Double check your indentation. I believe your error occurs earlier than this and the variable transcations_clean is reapted four times. Hence your count is four times higher than it should be.

If you wonder what some variable is referring to you could print it.
Similarly, if you want to observe the effect of some operation, you can print the involved values before and after.