Semrush interview question

Review this python code and fix it.