For anyone having this issue even though their code is actually correct…
In this Python training, it uses 2 spaces for indentation, but somehow there can be a mishap where your indentation is messed up and continues to break your code even though it looks perfectly alright and indentations match up perfectly. To fix this, I removed all my indentations and used the space key to indent my code and then all was OK.
Here are pictures of the code. The first one is from another site that is an online Python tool I use for testing. Notice how the indentation looks correct. But, it gives an error as well about indentation.
Here’s what the actual code looks like in Notepad++ when you turn on invisible characters. Notice the arrows at the end of the code. Those are tabs when they should be spaces. Both Codecademy and this other site didn’t automatically fix this for me.