USAA Interview Question

gave a couple tasks to complete in python