Aily Interview Question

A Python code snippet badly written