Amadeus Interview Question

about python coding