Aurora Labs Interview Question

writing output validation in python