Pergunta de entrevista da empresa ADVA

Python basics How would I test the described problem?