• Weird assert

Question related to mission Changing direction

 

I am confident in my code being correct, but I get an assertion error. I have manually counted the changes in direction for this assertion, and I'm pretty sure the answer should be 8.

assert changing_direction([6, 6, 6, 4, 1, 2, 5, 9, 7, 8, 5, 9, 4, 2, 6]) == 7 ... Fail

Please can this be fixed or explained? thanks