Aily interview question

A Python code snippet badly written