ADVA Interview Question

Python basics How would I test the described problem?