Grab Interview Question

Solve a question using Python.