Since that line is in a loop body, it needs to be indented.
Aside
One gets the feeling you may have opted to challenge yourself by jumping right into a project, before completing the Learn Python 3 track. You’ll find that course is most essential to get ourselves up to speed. Suggest pause this project and look for that course in your dashboard. Spend the holidays working on it and you’ll find the projects a little easier to think through. They are intentionally written to let us see how much we are picking up and understanding.