Question d’entretien chez IBM

Solve the following Python question?