Nordcloud interview question

A person who has an average Python level easy can solve the task