Uber Interview Question

basic python list iteration problem