Lyft Interview Question

a simple coding exercise in Python