ADVA interview question

Python basics How would I test the described problem?