Pregunta de entrevista de ADVA

Python basics How would I test the described problem?